.htaccess 将/mobile/REQUEST\u URI重定向到/REQUEST\u URI
这就是我现在拥有的.htaccess 将/mobile/REQUEST\u URI重定向到/REQUEST\u URI,.htaccess,url,redirect,.htaccess,Url,Redirect,这就是我现在拥有的 RedirectMatch 301 ^/mobile/ https://www.websitename.com/? RedirectMatch 301 ^/m/ https://www.websitename.com/? 我试图将用户类型/m/testpage.php重定向到/testpage.php 上述示例始终重定向到同一url。找到了答案: RewriteRule ^mobile/(.*)$ /$1 [R=301,NC,L] RewriteRule ^m/(.*)$
RedirectMatch 301 ^/mobile/ https://www.websitename.com/?
RedirectMatch 301 ^/m/ https://www.websitename.com/?
我试图将用户类型/m/testpage.php重定向到/testpage.php
上述示例始终重定向到同一url。找到了答案:
RewriteRule ^mobile/(.*)$ /$1 [R=301,NC,L]
RewriteRule ^m/(.*)$ /$1 [R=301,NC,L]