我在ISAPI_rewrite 3中遇到了一个问题。
A有一个像这样的url
www.example.com/web/index.html?ag=2154
我想要的是,当用户写这个地址时,它应该被转换为代理的子域,如
www.2154.example.com/web/index.html?ag=2154
提前感谢
发布于 2009-11-27 19:10:10
您是希望更改地址栏中的URL,还是希望在幕后对其进行转换?请尝试其中一种
RewriteBase /
RewriteCond %{QUERY_STRING} ^ag=(\d+)$ [NC]
RewriteRule ^web/index\.html$ http://www.%1.example.com%{REQUEST_URI} [NC,L]或
RewriteBase /
RewriteCond %{QUERY_STRING} ^ag=(\d+)$ [NC]
RewriteRule ^web/index\.html$ http://www.%1.example.com%{REQUEST_URI} [NC,P]https://stackoverflow.com/questions/1802995
复制相似问题