Msg#: 3106747 posted 1:26 pm on Oct 3, 2006 (gmt 0)
Hello everyone Our site is hosted on a windows server and runs ASP. the database is MS Access. We want to migrate the site to a linux server because we have realised ASP programming has its own limitations
Now, converting the data already in our MS Access database to Mysql format is not a problem nor is converting the .asp files to .php an issue.
My problem is this; I have a lot of pages coded in .asp which are indexed by the search engines and bringing a lot of traffic. Obviously if i migrate to linux the .asp files will not execute nor work.
If i move to the linux server, is there a way that if someone finds our website through the the indexed .asp files in the search engines to redirect them to the equivalent .php files which i will create on the linux server?
i do not want to lose all this traffic coming in from the .asp pages and need to redirect them to the equivalent pages in .php. Also i do not want to redirect the traffic to a generic page but individual pages for all indexed files.
Your help on this issue will be highly appreciated Regards 3mice
Msg#: 3106747 posted 2:41 pm on Oct 3, 2006 (gmt 0)
You should avoid redirecting unless absolutely necessary, and in this case it probably isn't necessary to change the page URLs. There is no technical reason why PHP files have to have the .php extension, so you can simply use a new AddHandler directove to parse .asp files for PHP, either in httpd.conf or .htaccess.
If you are forced to change the page URLs, then you should use
RedirectMatch or mod_rewrite to generate a 301 Permanent Redirect (never a 302) to the new pages.
Msg#: 3106747 posted 5:17 pm on Oct 3, 2006 (gmt 0)
In the long-run, it would be better not to use either an .asp or .php extension. Why give hackers a clue to what technology you are using? (Although mis-directing them to think you are using asp when you are using php is interesting...)
Use .html or no extension, and 301 redirects to transition to the new scheme.