开发者

virtual subdomain

i want this:

http://100.mydomain.ir ---> http://mydomain.ir?option=user&id=100

i try this, but do not开发者_如何转开发 work:

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{HTTP_HOST} !^(www|mail).mydomain.ir$ [NC]

RewriteCond %{HTTP_HOST} !^(www|mail).mydomain.ir$ [NC]

RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9-]+).mydomain.ir$ [NC] 

RewriteRule ^(.*)/$ ?option=user&id=%2 [R=301,L]

what is my correct .htaccess code?


Use mod_rewrite to achieve this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜