.htaccess redirect my site gives internal error -
i trying first time make .htaccess file. @ start make redirect, if person writes:
the person redirected
i made file, , added following code:
redirect 301 https://example.com/robots.txt/ https://example.com/index.php
i tried with:
redirectmatch 301 ^/bonus https://example.com/robots.txt redirectmatch 301 ^/ https://example.com/
which both resulted in site got internal error. how correct way that?
i'm not 100% sure why want direct away robots.txt
file stop search engine crawlers accessing file... can using this:
redirect 301 /robots.txt /index.php
or, try this:
redirect 301 /robots.txt https://www.example.com/
to rid of www
use this:
rewriteengine on rewritecond %{http_host} ^www.example.com$ [nc] rewriterule ^(.*)$ http://example.com/$1 [r=301,l]
Comments
Post a Comment