logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Remove index.php from permalink

My permalink structure is:

http://www.mysite.com/index.php/post-title

I moved the installation to a Linux server and I want to remove the 'index.php' from permalink.

If I make this change, Google will think there is a broken page (former URL), and a duplicate page on my site (new url): it may penalise both URLs (pages), and my page severely drops in ranking on Google: well at least for a while until Google decides drop the old page from its index.

How can I make this change and prevent this from happening?

How can I make the redirect from old URL to new URL?

Thanks!

Rodrigo F | 12/02/11 at 3:39pm Edit
Tutorial: How to assign prize money


(7) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    12/02/11
    3:45pm
    Julio Potier says:

    Hello

    You can use this plugin :

    Your new permalink won't be duplicated, it acts like 301 redirections, not "another page like the other one"

    See you !

  • avatar
    Last edited:
    12/02/11
    3:47pm
    Luis Cordova says:

    what plugin?

    lol

    no you just need to make your index.php change a bit or your .htaccess

    that is it

  • avatar
    Last edited:
    12/02/11
    3:49pm
    Sébastien | French WordpressDesigner says:

    Julio, ton lien est pas passé.

    Like Luis : you can add a simple line in your htaccess to make a redirection

    Previous versions of this answer: 12/02/11 at 3:49pm

    • 12/02/11 3:56pm

      Sébastien | French WordpressDesigner says:

      your permalink structure is what ?
      Could you look at that here :
      http://YOUR-SITE-INTERNET.COM/wp-admin/options-permalink.php

  • avatar
    Last edited:
    12/02/11
    3:56pm
    Bogdan says:

    You have an .htaccess file? You are using wordpress? If you don`t have a file named .htacces, make one (give the permissions 777) and add this code:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    P.S: Before, download the .htaccess file to your computer to have a backup in case that something goes wrong.


    LE: Don`t forget to modifiy your Permalinks in case that you user Wordpress.


    LE 2: Or try this:

    RewriteCond %{THE_REQUEST} \/index.php\ HTTP [NC]
    RewriteRule (.*)index.php$ /$1 [R=301,L]

    LE 3: After that,use this plugin: http://urbangiraffe.com/plugins/redirection/

    attachment image View Attachment

    Previous versions of this answer: 12/02/11 at 3:49pm | 12/02/11 at 3:51pm | 12/02/11 at 3:52pm | 12/02/11 at 3:56pm

    • 12/04/11 10:07am

      Bogdan says:

      So... you solve the problem or what?

  • avatar
    Last edited:
    12/02/11
    3:49pm
    Jerson Baguio says:

    try to use this plugin : http://wordpress.org/extend/plugins/redirection/

  • avatar
    Last edited:
    12/02/11
    4:34pm
    Ivaylo Draganov says:

    Hello,

    you shouldn't worry about that, because to WordPress http://example.com/index.php/post-title and http://example.com/post-title are the same. I mean, if you enable the pretty permalinks(without index.php) on your new server, then the old "almost pretty" ones (with index.php) will be automatically internally redirected by WordPress.

    Try it. Change your permalink structure* and then visit one of the old URLs. You'll notice how it redirects.

    * the permalink structures (without the index.php part) must match

    Previous versions of this answer: 12/02/11 at 4:34pm

  • avatar
    Last edited:
    12/03/11
    7:42am
    Francisco Javier Carazo Gil says:

    Hi Rodrigo,

    Apart from:
    * htaccess
    * redirection plugin
    * new permalink structure

    You may have to notify Google via Google Webmaster Tools: https://www.google.com/webmasters/tools

    If you are using a Sitemap (try this: http://wordpress.org/extend/plugins/google-sitemap-generator/) you will have to delete it and make a new one.

This question has expired.





Current status of this question: Community pot



Please log in to add additional discourse to this page.





Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.