How can I allow robot.txt in my .htaccess file
RewriteEngine on
RewriteCond %{REQUEST_URI} !=/server-status
RewriteRule ^folder1/(.+)?$ folder1/$1 [L]
RewriteRule ^folder2/(.+)?$ folder2/$1 [L]
RewriteRule ^folder3/(.+)?$ folder3/$1 [L]
RewriteRule ^folder4/(.+)?$ folder4/$1 [L]
RewriteRule "^robots.txt$" "robots.txt" [L]
RewriteRule "^favicon.ico$" "favicon.ico" [L]
RewriteBase /
RewriteRule !\.(gif|jpg|jpeg|png|css|js|php|htaccess|xml|htm|html|swf|pdf)$ index.php
<ifModule mod_headers.c>
# Expires after 1 month
<filesMatch ".(css|js)$">
Header set Cache-Control "max-age=2592000"
</filesMatch>
# Expires after 1 day
<filesMatch ".(jpg|jpeg|gif|png|x-icon)$">
Header set Cache-Control "max-age=31536000"
</filesMatch>
</ifModule>
0 Comments