I have nginx running on Linux. I want to take an .aspx
webpage and output just the html from it (no <% %>
directives, imports or page declarations.)
For simplicity's sake, assume that all .aspx
pages I host are simply .html files renamed with a .aspx
extension.
When I point nginx to the location of index.aspx
, it asks me to download the file instead of displaying the file's html contents, whereas index.html
displays fine.
I have thought of a few ways I could solve this problem.
- Write an nginx module to process .aspx pages as thought they were html
- Change recognized mimetypes and associate them with html
- I tried adding
application/aspx html htm shtml;
to my nginx mimetype file and it didn't work.
- I tried adding
- Calling cgi to read the .aspx file and generate html which gets returned
My reason for asking this question is because I want to utilize an existing aspx-based web application. This aspx app doesn't have any c# specific code in the aspx files themselves, so it would greatly reduce my work.