homepage Welcome to WebmasterWorld Guest from 54.167.41.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Migrate from PHP to ASP
haggul




msg:3786206
 10:51 am on Nov 14, 2008 (gmt 0)

I have an ecommerce site which is being moved from PHP to ASP (I know I know but that's the topic for another forum!)

The current URLs are simply page.php?ID=1234 or similar and so mapping across to ASP should be easy enough as such, but what is the best way to go about it?

Should I leave the PHP pages there, but doing a 301 redirect to the new ASP pages?

For dynamic sites will a 301 with a querystring work the same so page.php?ID=1234 can be 301'd to newpage.asp?ID=1234

Thanks!

[edited by: tedster at 7:54 pm (utc) on Nov. 14, 2008]

 

rankboy




msg:3786517
 8:03 pm on Nov 14, 2008 (gmt 0)

That shouldn't be a problem. While you can do this at the Apache level I think I would prefer the PHP level because what if the pages aren't named the exact same thing?

Here is the code I would use on the PHP pages:


<?php
header("HTTP/1.1 301 Moved Permanently");
$query_append = '';
if ($_SERVER['QUERY_STRING'])
{
$query_append = '?'.$_SERVER['QUERY_STRING'];
}
header("Location: /newpage.asp{$query_append}");
?>

haggul




msg:3787904
 1:55 pm on Nov 17, 2008 (gmt 0)

Many thanks rankboy - that looks pretty straight forward.

Can I expect a bit of a tanking in the SERPS though do you think?

panos




msg:3788030
 4:42 pm on Nov 17, 2008 (gmt 0)

If you don't want to setup redirects you could add this to your htaccess file:

AddType application/x-httpd-asp .php

This tells the server to parse .php files as asp

MrSpeed




msg:3788158
 7:22 pm on Nov 17, 2008 (gmt 0)

If you're switching to ASP I imagine your also going to IIS? I've never heard of someone running PHP under IIS. You could maybe have the PHP extension files run as ASP.

I've done a few site redesigns lately from asp to aspx. Besides changing the extension we also changed directory names. We noticed no drop in traffic and Google seemed quick to handle the changes.

If you have a strong site with good PR and trust I would just do a clean sweep, forget about the PHP files, and have a good 404 handler.

bateman_ap




msg:3788169
 7:33 pm on Nov 17, 2008 (gmt 0)

I've never heard of someone running PHP under IIS

I have done this a few times, actually works pretty well as long as you read up of performance issues. Off the top of my head you had to use FastCGI or it ran vvvv slowly!

haggul




msg:3788648
 9:04 am on Nov 18, 2008 (gmt 0)

Cheers guys - funnily enough the current PHP site already runs under IIS - we had to move the site a while back when our Linux box went bang and it never went back (because we knew this migration would happen one day)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved