如何为更复杂的URL定义子域URL重写规则

时间:2012-05-14 06:20:19

标签: url for-loop rewrite rule

1 个答案:

答案 0 :(得分:0)

将以下代码输入 .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9_-]+)\.(.+)$
RewriteRule ^$ http://%{HTTP_HOST}/subfoldername/index.php?alist&TP=xyz&ct=%2 [L]