Forum Moderators: Robert Charlton & goodroi
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]
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}");
?>
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.