开发者

.htaccess variable not passover

I the modrewrites to work to pass haha.domain.com to domain.com/master5.php?userid=haha

but I cannot pass the subdomain to more controllers like haha.domain.com/33/44 to doma开发者_StackOverflow社区in.com/master5.php?userid=haha&pid=33&wid=44

here's my code below:

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]


Try adding QSA (Query String Append) to the RewriteRules: [L,QSA].

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜