我有文件结构
index.php
.htaccess
news/index.php
news/.htaccess
首先.htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/news/
RewriteRule . /index.php [L]
第二(新闻/ .htaccess)
RewriteEngine On
RewriteRule . /index.php
请求http://test.t/news/news/61处理第一个index.php,但我需要在第二个
我为第一个.htaccess尝试了一些选项,但它没有成功
1 回答
检查Apache配置文件(httpd.conf)并确保您为站点使用的目录包含AllowOverride选项 .
例: