Masking Domain URL with Sub domain URL
Hai i'm ha开发者_如何转开发ving a subdomain (abc.example.in) but this is referred to mydomain/folder . the thing is i want the mask URL links and the masked url should be displayed following with sub domain can any one help me out .
mydomain/folder/path
to
abc.example.in/path
Can you just rewrite all urls on mydomain/folder/path to abc.example.in/path and make sure all of the links in your app refer to the subdomain links?
The rewrite would be something like:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} http://[a-zA-Z0-9\.-]*mydomain/folder/(.*)
RewriteRule ^/folder/(.*)$ http://abc.example.in/$1 [L,R=301]
This should match all requests to *.mydomain/folder/ and force them via a SEO-friendly 301 redirect to abc.example.in.
精彩评论