www.blog.cheapantivirus.com to www.cheapantivirus.com/blog/index.html
www.blog.cheapantivirus.com to www.cheapantivirus.com/blog/index.html
www.subdomain.cheapantivirus.com to www.cheapantivirus.com/blog/index.html
www.foo.cheapantivirus.com to www.cheapantivirus.com/blog/index.html
Note that this requires mod_proxy enabled in your Apache.
This will proxy:
www.blog.cheapantivirus.com to www.cheapantivirus.com/blog/index.html
www.blog.cheapantivirus.com to www.cheapantivirus.com/blog/index.html
www.subdomain.cheapantivirus.com to www.cheapantivirus.com/blog/index.html
www.foo.cheapantivirus.com to www.cheapantivirus.com/blog/index.html
Since it is using P flag therefore it won't cause your browser URL to change.
发布评论
评论(2)
您可以尝试这样的通用规则:
请注意,这需要在您的 Apache 中启用 mod_proxy。
这将代理:
由于它使用
P
标志,因此不会导致您的浏览器 URL 发生更改。You can try a generic rule like this:
Note that this requires mod_proxy enabled in your Apache.
This will proxy:
Since it is using
P
flag therefore it won't cause your browser URL to change.如果您想发送来自 www.blog.myname 的所有请求, .com 到 www.blog.myname.com/blog 使用此替代
将以下内容添加到
.htaccess
文件中您已有的重定向规则之后If you want to send all requests from www.blog.myname.com to www.blog.myname.com/blog use this instead
Add the following to the
.htaccess
file after the redirect rule you already have