开发者

subdomain htaccess redirect

I have searched Google for this thing but nothing found I 开发者_StackOverflowwould like to redirect any sub-domain to new page which is located in new directory

example: if people write http://subdomain.example.com it will automatically redirect to http://subdomain.example.com/newdirectory/new-index.php


You might want to do a url rewriting redirection

RewriteEngine  on
RewriteRule    ^(.*)$  / newdirectory/$1 [R]

In my example I presumed new-index.php is actually call index.php so that it is easier and makes more sense to me.

Have a look at:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜