【发布时间】: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