homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
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

 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


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



 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:

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


 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?


 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


 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.


 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!


 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