Support » Fixing WordPress » 301 Redirect .php extension to WP pretty links

  • Hi 🙂

    I recently switched my old fashioned hand coded static site into a nice WordPress one.

    However, I want my .php old files indexed in Google to redirect to my pretty WordPress links (without extension).

    I tried diverse .htaccess codes but it doesn’t seem to work.

    Found a default .htaccess including this code in my root folder (where the new site lies)

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Could this be this one that prevents a 301 redirect from working fine?

    Thanks in advance for the replies.

    Dom.

Viewing 1 replies (of 1 total)
  • Oops! I forgot to add that both old site and new use folders, example:

    mydomainname.com/folder/page.php

    Sorry…

Viewing 1 replies (of 1 total)
  • The topic ‘301 Redirect .php extension to WP pretty links’ is closed to new replies.