apache robots.txt with SSL
- by user224013
I have an .htaccess file with a rewrite rule to get a redirect of every HTTP request to HTTPS.
But now I have a problem that my robots.txt is not recognized by some online checker.
If I remove the redirect from the .htaccess file the robots.txt is recognized correctly.
Maybe I should exclude that the robots.txt is redirects to an HTTPS connection?
This is the part of .htaccess for redirecting to HTTPS
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L]