htaccess重定向子域而不更改url

时间:2017-04-12 01:59:25

标签: php apache .htaccess redirect mod-rewrite

您好我已经设法将页面domain.com/location/england重定向到subdomain.domain.com而不更改网址。意思是说。在键入浏览器时,subdomain.domain.com其内容为domain.com/location/england页面。

RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.domain.co.uk
RewriteRule ^(.*) http://domain.co.uk/location/england/ [P]

我的问题是,有可能在页面domain.com/location/england显示此页面内的所有网址链接时。点击网址时,浏览器仍会保留subdomain.domain.com而不会更改?这可能在.htaccess中就像屏蔽了网址一样。

谢谢。

0 个答案:

没有答案
相关问题