Welcome to WebmasterWorld Guest from 18.205.109.82

Forum Moderators: phranque

Message Too Old, No Replies

Redirecting old URLs to new pages

Converting site from htm to php

     
10:07 pm on Nov 19, 2007 (gmt 0)

Full Member

10+ Year Member

joined:Apr 7, 2006
posts:201
votes: 0


I am converting my html site to php so that I can use includes to more easily update navigation and other common page elements.

At this time I have many inbound links to the existing .htm pages so I want visitors to these old pages to be redirected to the new .php versions.

In the past when I redesigned a client site I kept the old page files on the server and added some javascript to them which automatically redirected to the new pages.

This time around I'm hoping for a tidier solution. Is it possible to put these page redirections in the htaccess file and take the original pages off the server entirely? What is the best way to tackle this?

Any help is greatly appreciated.

9:31 am on Nov 20, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


Yes there is - in fact, you want to generate a permanently moved header (301) when doing the redirect so you don't lose current position in the search engines. Javascript or meta-refresh won't manage this for you.

Start digging around the Apache Forum [webmasterworld.com] for the threads on mod_rewrite. This will do both of the above for you.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members