由网友(人间朝暮)分享简介:下面就是我想要做的事情。Here's what I'm trying to do.当你键入 m.example.com 我想将用户重定向到 example.com/m / ,但我想在URL地址栏保持如果可能的话m.example.com。When you type m.example.com I want use...
下面就是我想要做的事情。
Here's what I'm trying to do.
当你键入 m.example.com 我想将用户重定向到 example.com/m / ,但我想在URL地址栏保持如果可能的话m.example.com。
When you type m.example.com I want users to be redirected to example.com/m/ but I would like the url in the address bar to remain m.example.com if possible.
推荐答案
您可以做到这一点的mod_rewrite和mod_proxy的:
You can do that with mod_rewrite and mod_proxy:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^m.example.com$
RewriteRule ^ http://example.com/m%{REQUEST_URI} [L,P]
相关推荐
最新文章