0
我有Apache/2.2.22(Ubuntu)。网站目录:Mod_rewrite返回404错误
.htaccess
index.php
catalog.php
当我在浏览器中键入:
site.local/about-company - redirect to index.php
site.local/faq - redirect to index.php
site.local/catalog - return 404
**.htaccess**
DirectoryIndex index.php
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php
当用户输入'catalog'时,你期待什么? –
我希望重定向到index.php –
尝试在规则中附加标志'RewriteRule ^(。*)$ index.php [R = 302,L]' –