当前位置: 动力学知识库 > 问答 > 编程问答 >

php - htaccess redirect domain a.com to b.com/blog with keep a.com adress

问题描述:

I want redirect domain a.com to b.com/blog

but want keep a.com adress in browser bar.



I currently have

RewriteEngine On

RewriteCond %{HTTP_HOST} ^a\.com$ [NC]

RewriteRule ^(.*)$ b.com/$1 [L,R=301]

网友答案:

You can't. It would be quite a security hole for a browser to be redirected to a different domain without the address bar showing this!

You could use iFrames ... but I would first question why you want to do this at all.

分享给朋友:
您可能感兴趣的文章:
随机阅读: