PDA

View Full Version : Updating from .SHTML to .PHP


salientdigital
09-09-2004, 12:34 AM
I have read several posts here and other sites. One of interest is this one, on domain changes (http://forums.searchenginewatch.com/showthread.php?t=1464).

Almost without fail, good SEOers recommend a '301 redirect'... which (unless I am missing something) requires modifying/creating .htaccess in Apache, or something similar depending on the web server.

In my current situation, though, I am converting a site from .shtml to .php, on a shared host where I don't have permission to modify .htaccess. I know that on a PHP page, issuing a header("Location: http://newsite.com/newpage.php"); provides the 301 response the bots play nice with.

My question is, can you/how do you issue a proper 301 redirect when the catalogged pages are all .shtml AND can't .htaccess ? :confused:

FWIW, I had an admin make a DNS change on a different site, similar situation, and got completely dropped from Google's SERPs.

I presently have it set up with all of the original .shtml pages saying 'This page has moved' with a link to the new PHP page... but I doubt that using this technique will update the URLs in the SE database.

Nick W
09-09-2004, 02:24 AM
Are you 100% that you cant add an .htaccess? - it's highly irregular for a host company to not allow that...

Personally, i'd ring them, explain the situation and if they wont give you permission to use .htaccess ask them to help with the transition by just making all .shtml ext's run through the php engine...

Sorry cant be more help, speaking to the host is the best way i think...

Nick

seomike
09-09-2004, 10:55 AM
header("Location: http://newsite.com/newpage.php"); will give a 302 redirect to make it a 301 you'll have to add this additional header to give the correct 301 to the spiders.

header("HTTP/1.1 301 Moved Permanently");
header("Location: http://newsite.com/newpage.php"); ;)

salientdigital
09-09-2004, 03:27 PM
Thanks for the tip seomike... will add that for future PHP sites.

Unfortunately I have talked to the host about the .shtml redirect problem... it's not running on Apache nor IIS... it's a very old version of Zeus. ISP says it "will not" make changes to the config, and the control panel that I have access to permits only addition/deletion of email accounts - thats about it.

I know on my other sites, I can set up proper redirects from within cPanel... maybe its time to move the old site to a friendlier host.

seomike
09-09-2004, 11:17 PM
I'd recommend pair.com. I don't know if this will go well with the mods here but they IMHO are the best. Been with them for 3 years and never once had a problem :D

Nick W
09-10-2004, 01:38 AM
I'll 2nd pair.com - been with them for 2yrs i think, never, ever, found a host im happier with...

Nick