Mapping .asp to php on Linux

tetranz

Perch
I'm migrating a classic asp site from another host. I want to move it to Linux and php. There is very little actual asp code that does anything useful so I'd rather go to php on Linux and rewrite a few things.

To keep the urls the same for search engines etc, is there a way to map the .asp extension so that it is processed by php on a shared Linux account? On my own machine I would just add .asp to the AddType application/x-httpd-php line in the Apache config file. Is there a way of doing this for one shared account? I guess I could use mod_rewrite with .htaccess but doing it the first way is much more efficient.

Thanks
 
Thanks Praveen. That works perfectly. I didn't notice that earlier.

A note for anyone doing this. It doesn't work immediately, even after hitting the "Apply Changes" link further up the screen. It takes five minutes or so before it works. I think the Apache thread needs to recycle.
 
Thanks Praveen. That works perfectly. I didn't notice that earlier.

A note for anyone doing this. It doesn't work immediately, even after hitting the "Apply Changes" link further up the screen. It takes five minutes or so before it works. I think the Apache thread needs to recycle.

you are exactly right, apply changes makes it save, then after apache reloads it will work properly.
 
Back
Top