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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing exetnsions

Status
Not open for further replies.

benluke4

Technical User
Jan 27, 2005
127
GB
Hi,

im rebuilding a site so it is easier/quicker to update. I will be changing little content but will be changing all of the .htm extensions to either .shtml or .php

Now this site has pretty good rankings on a fair few search engines. How do i do this without screwing the ranks UP??

Thanks

Ben
 
set up 301 (or is it 302) redirects whenever someone or something requests the old pages

you can do this via .htaccess or a scripting language such as PHP or ASP.

2 methods spring to mind.. not sure which is best

1. Use mod_rewrite and an htaccess file to catch requests for the "old" pages and rewrite the url to the new page.

2. Use htaccess to point at a custom 404 page. The 404 page would have a PHP/ASP script that looks at the incoming URL and if it matches one you specify in the script, redirects the corresponding page.

Foamcow Heavy Industries - Web design and ranting
Toccoa Games - Day of Defeat gaming community
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
"I'm making time
 
ok thanks - They both sound exacly what im looking for.

i no not how to do them so better start reading. any body point me in the right direction

Thanks again foam cow

ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top