Forum Moderators: phranque

Message Too Old, No Replies

Redirecting old URLs to new pages

Converting site from htm to php

         

koncept

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

10+ Year Member



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.

rocknbil

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

WebmasterWorld Senior Member 10+ Year Member



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.