我添加了 RewriteCond ,它应该从重定向中省略管理目录。但是它继续像这样发送 URL
http://www.site.tld/admin/software/windows/edit/148到http://www.site.tld/help.php
我在这里做错了什么?一直在尝试解决这个问题......
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/admin/
</IfModule>
RedirectMatch 301 /en/(.*) /$1
RedirectMatch 301 /windows/(.*) /$1
RedirectMatch 301 /home/os/(.*) /os/$1
RedirectMatch 301 ^/software/add_version/(.*) http://www.site.tld/help.php
RedirectMatch 301 ^/edit/(.*) http://www.site.tld/help.php
RedirectMatch 301 ^/software/edit/(.*) http://www.site.tld/help.php
RedirectMatch 301 ^/software/add_image/(.*) http://www.site.tld/help.php