我想将所有流量从重定向subdomain.domain.com
到subdomain.domain.com/?appselect=app1
。
我在这里遵循了一些示例:在.htaccess中重写查询字符串,但是由于某些原因,它们对我不起作用。这是我到目前为止所拥有的:
RewriteEngine On
RewriteRule ^/$ /?appselect=app1 [PT,L]
但这只是转到同一页面: subdomain.domain.com
在这方面的任何帮助,将不胜感激,谢谢。
如果要重定向,请添加R
标志:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain\. [NC]
RewriteCond %{QUERY_STRING} !(^|&)appselect=app1 [NC]
RewriteRule ^/?$ /?appselect=app1 [QSA,L,R=302]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句