我在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############################
答案 0 :(得分:0)
请检查文件名,在linux服务器中,如果名称不是您输入的确切情况。它将返回404.确保文件名为'robots.txt'(小例)
答案 1 :(得分:0)
感谢vilsad回复问题。
我发现了这个问题,虽然我在这里有点受到了嘲讽,但它是:我正在上传到错误的地方:&#34; led-flex.co.uk&#34;而不是&#34; ledflexi.co.uk&#34;。
什么是Klutz!