Forum Moderators: phranque

Message Too Old, No Replies

Moving from IIS to Apache

Here is a tricky one

         

ryan26

8:41 pm on Mar 19, 2005 (gmt 0)

10+ Year Member



There may not be any one easy solution to this issue, but I thought I would throw it out there to see if anybody could offer any advise.

- Moving a website from IIS to Apache. Just rewrote the site top-to-bottom from ASP to PHP.

- 500 dynamic pages indexed. All look like page.aspx?fruit=100. New location will be page.php?fruit=100.

Idealy, I would like to 301 all of the dynamic locations to their new location. That WOULD be easy. However, how can I do this given that I will be switching platforms? I cannot host a .aspx page on my Apache server, correct?

Worst case scenario, I move the entire thing to a new domain and start from scratch. However, the damn thing would be sandboxed.

Help! I need somebody! Help!

jdMorgan

9:08 pm on Mar 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using Apache mod_rewrite, you can leave all of your page names unchanged if you like; Simply do a server-internal rewrite and serve page.php when page.aspx is requested. No-one, not visitors, and not search engine robots will be the wiser (nor do they care).

This pretty much takes care of all of your other concerns as well.

Jim

jorj

10:38 pm on Mar 19, 2005 (gmt 0)

10+ Year Member



or even better: declare the aspx extension as php-type.

encyclo

12:58 am on Mar 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm with jorj: it's a one-liner in httpd.conf or a root-level .htaccess:

AddHandler application/x-httpd-php .aspx

Just because you're using the file extension .aspx doesn't mean it needs to be .NET underneath. Gives you a little security by obscurity as well, for whatever that's worth.

ryan26

1:45 pm on Mar 21, 2005 (gmt 0)

10+ Year Member



Thanks a lot guys. Went with the MIME route.