Forum Moderators: phranque

Message Too Old, No Replies

.asp pages (not apache::asp, not mod mono)

         

gwjacc

4:57 pm on May 14, 2008 (gmt 0)

10+ Year Member



Hey All,

I'm new to the forum and am having an issue with converting a site over to a linux machine. We are currently running .asp scripts on a windows IIS machine, and are in the process of moving the whole thing over to a linux server (and converting them to .php files).

I've used "wget -r" to make a mirror of the site (which was mostly .asp pages) that I have set to be the preliminary site on the apache machine (temporarily neglecting the database and dynamic content- taking a "snapshot" of the current state of the site and running that until we have the php scripts and new sql database ready).

The problem I ran into is this: I have html pages with ".asp" extensions (hundreds of them, each with several ".asp" links within them). When I copy the static mirrored version of our site to apache, it only displays the code in the browser instead of the rendered html. These asp pages are not asp scripts, they are html pages with a ".asp" extension. I am wondering if anyone knows an easy way to make apache serve the pages so they are rendered, rather than displayed as text files?

Things I have tried:

- I changed the mime type (within the apache configuration file) for unknown files to "text/html".

- I have tried to use "sed 's/.asp/.php/g *.asp" on the site's directory to change all links to ".php" (getting ready for the new scripts) and then just changing the file extensions to .php. However, sed doesn't seem to change the files, it just outputs the changed text in the terminal.

Thanks for any help you might have.

jdMorgan

3:15 pm on May 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can control sed's output using command line switches. See the man page online.

You might want to try the RemoveHandler directive, in addition to AddType text/html .asp

Also, be aware that Internet Explorer often ignores MIME-types and tries to 'interpret' the file-contents itself. This should not be an issue if the pages are HTML, but can confuse testing.

Jim