【发布时间】:2012-02-15 08:52:19
【问题描述】:
目前我面临一个非常奇怪的问题,我在单个域上安装了 wordpress 和 oscommerce。我将 wordpress 放在根目录中,并将 oscommerce 放在 /store/ 文件夹中。 除了一件事,一切都正常工作。尽管页面显示正确,但 oscommerce 的服务器标头会引发 404 错误。这会导致 googlebot 根本不会索引这些页面。 有人可以帮我解决这个问题吗?我现在该怎么办?
Root httaccess is
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
RewriteEngine On
RewriteCond %{HTTP_HOST} ^outdoorwatersolutions.com [NC]
RewriteRule ^(.*)$ http://www.outdoorwatersolutions.com/$1 [L,R=301]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
而 oscommerce httaccess 是
Options +SymLinksIfOwnerMatch
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteBase instructions
# Change RewriteBase dependent on how your shop is accessed as below.
# http://www.mysite.com = RewriteBase /
# http://www.mysite.com/catalog/ = RewriteBase /catalog/
# http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/
# Change RewriteBase using the instructions above
RewriteBase /store/
RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]
# Articles contribution
RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA]
# Information pages
RewriteRule ^([a-z0-9/-]+)-i-([0-9]+).html$ information.php [NC,L,QSA]
# Links contribution
RewriteRule ^([a-z0-9/-]+)-links-([0-9_]+).html$ links.php [NC,L,QSA]
# Newsdesk contribution
RewriteRule ^([a-z0-9/-]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]
</IfModule>
【问题讨论】:
-
我认为除非您显示您的 .htaccess 文件或 httpd.conf(无论哪个是问题),否则您不会得到太多帮助。
-
您可以尝试 serverfault.com 以获取配置 Web 服务器的帮助。
-
我认为这不是 .htaccess 问题。您确定代码由于某种原因没有打印出 404 标头吗?
-
那么它可能是什么?页面显示正常,但是oscommerce访问server header,遇到404错误,那你说什么?
-
根据我的谷歌搜索,oscommerce 中的搜索引擎安全网址会导致此问题。
标签: php apache .htaccess googlebot