301 Redirect .php extension to WP pretty links (2 posts)

  1. prosperity66
    Posted 2 years ago #

    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]

    # END WordPress

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

    Thanks in advance for the replies.


  2. prosperity66
    Posted 2 years ago #

    Oops! I forgot to add that both old site and new use folders, example:



Topic Closed

This topic has been closed to new replies.

About this Topic