Jump to content

[SOLVED] mod something .asp files?


Recommended Posts

I used sitesucker to download a website a client wants to transfer over. No big thing except apache things .asp files are "Content-Type: text/plain"

 

Is there anything I or .htaccess can do to change that?

 

PS> tried adding "asp" to the text/html line on mime.types without success.

Link to comment
https://forums.phpfreaks.com/topic/46812-solved-mod-something-asp-files/
Share on other sites

You could try this in a htaccess file:

 

AddHandler application/x-httpd-php .asp

 

That would tell php to parse the asp file, and it might output the html cleanly. Apart from that, you'll have to get apache using asp for the site to fully work.

 

-steve

Awesome, .htaccess did the trick! I had previously tried adding that same line to httpd.conf -- but for some weird reason it didn't care.

 

As far as processing the asp files goes, Sitesucker is a client-side download utility. All it does is copy what a browser sees: the final output html, images, flash, etc. So the "asp" extension is really nothing more than an html file at this point. This is certainly easier than rewriting an out-of-date website's entire menu system and file extensions. Now, I'm freed up to do the redesign.

 

Thanks again!

"So the "asp" extension is really nothing more than an html file at this point. "

 

Ah. Yap, I thought as much. Obviously the server side stuff isnt included.

Well, Im glad it worked.

 

As for putting lines like AddHandler application/x-httpd-php .asp

directly into the httpd.conf you have to make sure yo apply it correctly in <Directory> and <File> tags.

 

-steve

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.