【发布时间】:2018-06-29 10:58:30
【问题描述】:
我正在尝试将robot.txt 放在我的godaddy 网站上。 我把它放在根目录上。 但我得到error404 not found 我认为这是由于我的 .htaccess
Htaccess 文件
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>
我也尝试在 htaccess 中添加条件,但没有帮助
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|assets)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>
有什么解决方法吗?
【问题讨论】:
标签: php apache .htaccess codeigniter mod-rewrite