在httpd.conf里设置的rewrite规则无法正常生效(以前此目录设置了.htaccess规则)
我在本地测试的apache rewrite规则是生效的。
规则写在apache的httpd.conf里。
规则如下
Rewrite ^/content/view/([0-9]+)/?(([0-9]+)/)? ^/detail\.php\?id=$1&cid=$2
因为之前有目录级的rewrite规则设置,我尝试把AllowOverride设置为None让此目录不解析.htaccess。同时删除.htaccess文件。
<Directory "网站路径">
AllowOverride None
</Directory>
但是重启完仍然无效。