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.
application/aspx html htm shtml;
to my nginx mimetype file and it didn't work.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.
This isn't the best solution, but I am developing a cgi application that will translate the REQUEST_URI
for aspx pages into an open(file).read() and output the aspx page contents to the browser.
I am developing an SSI parser to handle ssi calls, which so far is working for me but a little messy as it works for my setup only right now and has to redirect requests to SSI to my codebase instead of the .NET codebase based on file extension which is a poor solution.
Ultimately, creating an nginx module to handle aspx as it would html and offload ssi to the nginx module would be the best solution methinks.
Thanks to everyone who gave input, I know this question is definitely out in left field. Cheers.