I'm moving a static archived website to Apache from IIS/Windows, want to keep the old URLs that end with .aspx
How do I allow aspx/ashx as static content on Linux?
I don't plan to execute these files in Mono or anything, just to serve them as static (with all the code removed obviously, keeping only html)
I assume I should be doing something like this to my .htaccess:
AddType text/html .aspx
Am I right?
That should be OK. Does it work? Although best added to your server-config, rather than
.htaccess
, if possible.Alternatively, you can rename the physical (static) files to
.html
(which is, after all, what they are) and internally rewrite the request from.aspx
to.html
for backwards compatibility using mod_rewrite. For example: