I use the htaccess maker and have a problem with the redirect from non-www to www-URL for a specific file.
Google Adsense cannot crawl the ads.txt file in root directory, that leads to revenue loss.
Google support checked it and found, there is a slash too much at the redirect from non-www to https://www.domain.de/ads.txt/
The "/" after ads.txt/ should be removed.
It seems that there is a "/" added at general for all http redirect requests. How is it possible to prevent this or at least for the redirect to ads.txt?
Settings for base directory of the site use / for domain's root (like suggested in admintool documentation)
Redirect code, which is generated by htaccess maker:
##### Redirect index.php to / -- BEGIN
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^index\.php$ http%2://www.wunsch-hund.de/ [R=301,L]
##### Redirect index.php to / -- END
##### Redirect non-www to www -- BEGIN
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}>s ^(on>(s)|.*>s)$
RewriteRule ^(.*)$ http%2://www.%{HTTP_HOST}/$1 [R=301,L]
##### Redirect non-www to www -- END
Regards,
Wolfgang