我的htaccess文件是。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} \.php$
RewriteRule ^(.*)$ first.php
现在我希望此规则在我的admin文件夹中不起作用,
就像我的admin文件夹一样,admin
因此当我的网址
admin/logout.php
不起作用时
RewriteCond %{REQUEST_FILENAME} \.php$
否则admin/ajax/ajax.php
直接ajax.php
重定向到不重定向到first.php
另一种简单的方法是使用以下语句将.htaccess文件放入您的admin文件夹中
RewriteEngine Off
这将禁用您的admin文件夹中的所有重写。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句