【问题标题】:robots.txt returns 404, Magento ver. 1.9.0.1 site hosted on webfusion.co.ukrobots.txt 返回 404,Magento 版本。 1.9.0.1 网站托管在 webfusion.co.uk
【发布时间】:2015-07-30 08:14:22
【问题描述】:

我在 webfusion.co.uk 有一个托管帐户,我在其中托管了一些网站。我已经上传了 robots.txt 文件和 sitemap.xml 文件。当我尝试访问他们时:www.ledflexi.co.uk/robots.txt 或 www.ledflexi.co.uk/sitemap.xml。网站返回 404 错误。

我已将这两个文件上传到每个站点的根文件夹 (public_html/led-flex.co.uk)

.htaccess 文件的以下几行是否与此问题有关?

############################################
## 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>


############################################
## Prevent character encoding issues from server overrides  
## If you still have problems, use the second line instead

AddDefaultCharset Off
#AddDefaultCharset UTF-8

<IfModule mod_expires.c>

############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

ExpiresDefault "access plus 1 year"

</IfModule>

############################################
## By default allow all access

Order allow,deny
Allow from all



########################Redirection############################ 

【问题讨论】:

    标签: .htaccess robots.txt


    【解决方案1】:

    请检查文件名,如果名称与您输入的不完全一致,请在 linux 服务器中检查。它将返回 404。确保文件名是“robots.txt”(都是小写)

    【讨论】:

      【解决方案2】:

      感谢 vilsad 回答问题。

      我发现了问题,虽然我对此有点尴尬,但它是:我上传到错误的帐户:“led-flex.co.uk”而不是“ledflexi.co.uk”。

      真是个笨蛋!

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-09-19
        • 1970-01-01
        • 2015-06-12
        • 1970-01-01
        • 1970-01-01
        • 2018-12-01
        相关资源
        最近更新 更多