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
精彩评论