我有域名,如果URL中没有传递任何类似“ http://example.com ”的内容,我必须重定向URL,
然后我必须像此处
http://www.example.com/abc/1/那样进行重定向2/3
因此,如果url域除“ /”外没有任何内容,则我必须使用我指定的url进行重定向
RewriteCond %{REQUEST_URI} !(.*)
RewriteRule ^ mydomain.com
这应该工作:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [OR]
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^$ /abc/1/2/3 [R=302,L]
它应该只重定向example.com
到example.com/abc/1/2/3
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句