.htaccess变量不是逾越节

时间:2011-02-14 04:13:14

标签: php html .htaccess

我的modrewrites努力通过 haha.domain.comdomain.com/master5.php?userid=haha

但是我无法将子域传递给更多的控制器 haha.domain.com/33/44domain.com/master5.php?userid=haha&pid=33&wid=44

这是我的代码:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.domain\.com$ [NC]

RewriteRule ^$ http://www.domain.com/profile.php?username=%2 [L]

RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ http://www.domain.com/master5.php?username=%2&$1&$2 [L]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/$ http://www.domain.com/master5.php?username=%2&$1&$2 [L]

1 个答案:

答案 0 :(得分:2)

尝试将QSA(查询字符串追加)添加到RewriteRules:[L,QSA]