WordPress.org

Ready to get started?Download WordPress

Forums

redirect from index.php to domain.com/ (3 posts)

  1. newhope4u
    Member
    Posted 7 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

  2. foolswisdom
    Moderator
    Posted 7 years ago #

    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.

  3. ryanmcdonnell
    Member
    Posted 7 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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.