开发者

subdomain htaccess redirect

开发者 https://www.devze.com 2023-04-08 15:36 出处:网络
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

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

精彩评论

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