我在使用magento 1.5 CE安装时出现此问题,该问题会导致出现错误页面的随机问题:
错误是:此网页有一个重定向循环,并且显然是以随机方式生成的,因此很难跟踪和复制。
另一个非常奇怪的行为是,当我点击特定类别中的第一个产品时,它只是刷新页面而不会转到该产品页面。
该网站托管在Ubuntu机器上。我最近将PHP内存限制增加到512M而没有任何效果。
服务器上的错误日志不会跟踪此错误,但这很奇怪。
问题在于Google会不时记录此错误,并且在排名和客户互动方面都非常糟糕,因为用户无法看到应该看到的网页。
更新#1:
配置中的选项>目录>目录如下:
此设置过去常常有效,但现在由于某些特殊原因不再有效。
更新#2(解决了这个......显然与重定向循环问题无关):
我删除了以前的错误日志,现在它似乎记录了一些奇怪的行为:
[Mon Apr 28 12:46:42 2014] [error] [client 82.76.226.240] Directory index forbidden by Options directive: /var/www/vhosts/cissmarket.ro/public_html/skin/frontend/default/ciss/, referer: http://www.cissmarket.ro/imprimanta-ciss/acasa.html
[Mon Apr 28 12:46:42 2014] [error] [client 82.76.226.240] File does not exist: /var/www/vhosts/cissmarket.ro/error_docs/forbidden.html, referer: http://www.cissmarket.ro/imprimanta-ciss/acasa.html
[Mon Apr 28 12:46:45 2014] [error] [client 82.76.226.240] Directory index forbidden by Options directive: /var/www/vhosts/cissmarket.ro/public_html/skin/frontend/default/ciss/, referer: http://www.cissmarket.ro/imprimanta-ciss/acasa/epson-expression-home-xp-215-cu-ciss.html
[Mon Apr 28 12:46:45 2014] [error] [client 82.76.226.240] File does not exist: /var/www/vhosts/cissmarket.ro/error_docs/forbidden.html, referer: http://www.cissmarket.ro/imprimanta-ciss/acasa/epson-expression-home-xp-215-cu-ciss.html
[Mon Apr 28 12:46:48 2014] [error] [client 82.76.226.240] Directory index forbidden by Options directive: /var/www/vhosts/cissmarket.ro/public_html/skin/frontend/default/ciss/, referer: http://www.cissmarket.ro/imprimanta-ciss/acasa.html
[Mon Apr 28 12:46:48 2014] [error] [client 82.76.226.240] File does not exist: /var/www/vhosts/cissmarket.ro/error_docs/forbidden.html, referer: http://www.cissmarket.ro/imprimanta-ciss/acasa.html
[Mon Apr 28 12:46:50 2014] [error] [client 82.76.226.240] Directory index forbidden by Options directive: /var/www/vhosts/cissmarket.ro/public_html/skin/frontend/default/ciss/, referer: http://www.cissmarket.ro/imprimanta-ciss/acasa.html
[Mon Apr 28 12:46:50 2014] [error] [client 82.76.226.240] File does not exist: /var/www/vhosts/cissmarket.ro/error_docs/forbidden.html, referer: http://www.cissmarket.ro/imprimanta-ciss/acasa.html
[Mon Apr 28 12:47:08 2014] [error] [client 178.138.97.255] Directory index forbidden by Options directive: /var/www/vhosts/cissmarket.ro/public_html/skin/frontend/default/ciss/, referer: http://www.cissmarket.ro/imprimanta-ciss/imprimante-sublimare.html
[Mon Apr 28 12:47:08 2014] [error] [client 178.138.97.255] File does not exist: /var/www/vhosts/cissmarket.ro/error_docs/forbidden.html, referer: http://www.cissmarket.ro/imprimanta-ciss/imprimante-sublimare.html
点击F5后,这个错误的一次页面正常加载。这可能是服务器配置错误吗?
更新#3
这是.htaccess的mod_rewrite部分 - 显然它看起来很好。
<IfModule mod_rewrite.c>
############################################
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
RewriteBase /
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## always send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## rewrite everything else to index.php
RewriteRule .* index.php [L]
</IfModule>