【发布时间】:2012-07-04 11:40:18
【问题描述】:
真的找不到我的错误,我可以访问站点地图/链接,但所有其他人都给出了 404 Not Found 错误。
DirectoryIndex index.php index.php?page=home index.php?page=error
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
# some other stuff #
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
RewriteRule ^sitemap/?$ sitemap.xml.php [L]
RewriteRule ^([a-zA-Z]+)/?$ index.php?page=$1 [L]
RewriteRule ^products/?$ index.php?page=products [L]
RewriteRule ^products/([0-9]+)/?$ index.php?page=products&id=$1 [L]
</IfModule>
非常感谢您的帮助,我绝对不喜欢 .htaccess 文件...
【问题讨论】:
-
检查你的错误日志——显示了什么?
-
同一行一定次数:
[Wed Jul 04 02:56:30 2012] [error] [client 127.0.0.1] File does not exist: /var/www/home" -
那么……您确定问题出在您的 .htaccess 文件上吗?
-
不,我真的开始认为问题可能来自我的 Apache 配置。