0

I have the following in my .htaccess file:

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^$ /Home [R,NC] 
RewriteRule ^Home$ /index.php [NC,L]

but if I go to mydomain.com/index.php is still accesible and displaying the same content of mydomain.com/Home. That's ok for me, but is not well for SEO because I have duplicated content, so Is there a way to do a redirect and rewrite the URL to /Home when I access the /index.php ? I try with

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^$ /Home [R,NC] 
RewriteRule ^Home$ /index.php [NC]
RewriteRule ^index.php$ /Home [R=301,L]

but It is in loop.

1 Answer 1

0

Rather than fiddling with the deep dungeons of mod-rewrite/htaccess you should go for canonical links if it is indeed the same content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.