• Resolved Aedryan Methyus

    (@aedryan-methyus)


    Howdy WP users!
    Well, I FINALLY just finished converting my website (about 500 pages!) over into WordPress and the site is now live! Talk about A LOT of work!

    Anyway… I need to setup a 301 redirect in my htaccess file, which directs all og my old .htm URLs to their new corresponding .php URLs. The page names haven’t changed, just the extensions. I have tried a few different codes that i’ve found, but none of them seem to work.

    Here is what I tried for my last attempt:

    RewriteCond %{HTTP_HOST} ^domain.com
    RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
    
    RewriteRule ^(.+)\.htm$ http://www.domain.com/$1.php [R=301,L]

    Should the 301 redirects happen immediately or does it take awhile for the server to catch it or something?

    Any help or suggestions would be greatly appreciated! I’m afraid the spiders are going to come along and crawl some of my pages that were already .php and i’m going to end up getting penalized/banned for duplicate content or something…

    Thanks.

    ~ Aedryan

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘301 Redirect ALL .htm Pages To .php Pages?’ is closed to new replies.