newhope4u
Member
Posted 5 years ago #
Sorry if this is repeated:
Here is my problem
My site os christian-dating-service-plus.com/
How do do a 301 redirect from say:
http://photomatt.net/index.php
to http://photomatt.net/
Notice this blog has 2 different page ranks..in google..How do I redirect the latter to the former?
Thanks,
David
What you are wanting to do does not make sense to me. It is over optimization, and my instinct suggest it is even a bad practice. If people are linking to index.php figure out why.
ryanmcdonnell
Member
Posted 5 years ago #
This makes total sense... it's technically the same page but you can reach it from two unique URLs. That's not so good for search engine rankings as it looks like duplicate content. If you do a 301 redirect from one to the other then you can consolidate your ranking and authority for that page.
This worked for me:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteRule . / [R=301,L]
</IfModule>
But this before the WordPress rules in .htaccess