为什么不这个.htaccess文件redirect正确?
我有一个Web应用程序与多个页面。 .htaccess文件将domain-name.com/之后的所有内容redirect到我的index.php文件中,该文件处理input并呈现相应的页面。 但是,我也有一些实际的目录下domain-name.com/需要从redirect除外。 例如,我的PHPMyAdmin目录(/ pma)。 一切工作正常,直到我添加行redirect报告/ [名称]索引页也。 现在,我的/ pma不会进入PMA目录,而是进入我的应用程序的index.php。 如果我使用/pma/index.php,它可以工作,但是为什么/ pma会停止使用那个新的重写规则。 注释报告的RewriteRule导致一切再次运作。 我无法弄清楚为什么。 谢谢你的帮助! .htaccess文件: RewriteEngine On # Redirect http to https (http://htaccesscheatsheet.com/#force-https) RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} # Ignore the following directories (don't remap to page engine) RewriteCond %{REQUEST_URI} !^\/(pma*|css) #Redirect all /reports/[report name] requests to index.php?page=reports/[report name] RewriteRule ^reports/([a-z0-9\-_]+)\/{0,1}$ index.php?page=reports/$1 [NC,QSA,L] #Redirect […]