Welcome to WebmasterWorld Guest from 54.226.143.14

Forum Moderators: bakedjake

Message Too Old, No Replies

Moving Site from Windows to Linux

Need advise with redirecting indexed .asp files

   
1:26 pm on Oct 3, 2006 (gmt 0)

10+ Year Member



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

2:41 pm on Oct 3, 2006 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

You can check out our Apache Web Server [webmasterworld.com] forum and Apache forum library [webmasterworld.com] for specific examples. :)

5:17 pm on Oct 3, 2006 (gmt 0)

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 5+ Year Member



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.

8:08 am on Oct 4, 2006 (gmt 0)

10+ Year Member



"Although mis-directing them to think you are using asp when you are using php is interesting...)" - jtara

I'm not really misdirecting them . Just trying to figure how to reroute the traffic instead of them ending up at dead pages

Anyway the advice you've given is much appreciated

3mice

 

Featured Threads

Hot Threads This Week

Hot Threads This Month