homepage Welcome to WebmasterWorld Guest from 54.237.38.30
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Moving Site from Windows to Linux
Need advise with redirecting indexed .asp files
3Mice

10+ Year Member



 
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

 

encyclo

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



 
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.

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

jtara

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



 
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.

3Mice

10+ Year Member



 
Msg#: 3106747 posted 8:08 am on Oct 4, 2006 (gmt 0)

"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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
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