Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving a website from htm to php

Status
Not open for further replies.

leeboycymru

Programmer
Jan 23, 2007
185
GB
I am about to take my first steps with to create a cms driven by php.

This isnt the issue, the issue for me is that its a established website, and has very good listings in google and others.

All the extensions are .htm and so now I will be changing most of those to .php onviously.

What I would like to know, is what is the best practice to allow for the .htm links listed in the search engines to stay and for the new .php links to work with them.

I was thinking of either web forwrading on each .htm page to the new .php page, or putting a piece of code on the .htm pages that re-directed the user.

But another thing im fearing now is that although this will help my client to upload and manage his site more effectively, will he now look at the listings after I have worked on it and think that I have made his website lose ground on his competitiors, as those links will be new and non established.

Lee
 
Technically under apache you can use an add-handler for .htm to be parsed by the php engine. That's not terribly mainstream, but if your requiremens are such its something to consider.

D.E.R. Management - IT Project Management Consulting
 
i think thedaver's suggestion is better. leave the files as they are and just tell apache to bung htm files through the php engine. php will ignore all code that is not wrapped with <?php ?> tags.

if this is not a solution for you then i'd recommend you check out the SEO forum.
 
I am not terribly knowledgable but would it be possible to use mod_rewrite in apache to change the extensions on the fly from php to htm? So the htm extension stay the same.

If thats possible then you would not need your server to parse htm files.

 
Thanks for keeping this conversation going, i'm a absolute beginner with php and apache, as im using this site as my "diving in the deep end". I thin its the best way to learn it.

Cheers

Lee
 
absolutely - immersion is the best way.

Iechyd da!
 
well mate,

I speak a little bit of welsh, but that takes some workign out.

LOL

Lee

Anyway, its great to meet you
 
It was supposed to say ...

No, but I used to drink Wem Ale

I spent my childhood on the Welsh borders but that was 20 years ago now, so my Welsh is hellishly rusty. Wem Ales used to be the local cheap stuff (along with the Lees Jones brewery) but it was vile stuff and the world was a better place when it closed down a while ago (no offence to any of the employees there).
 
The Lees Jones brewery that sounds familiar!!!

I used to live in the valleys of south wales, but I used my head instead of my hands and got out of the valleys about 10 years ago.

I still just about live in wales, in Chepstow which is the posh bit...

But i still speak a bit of welsh now and again, mainly to talk about people without them knowing...

lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top