I would like to upload some HTML pages with the ending .aspx to our apache root server and I want apache to treat and deliver them just as regular .html files. I know this is unusual, but it is only for a preliminary site for SEO reasons until I get a windows server.

Right now when I view one of the files in my browser, the browser treats them as text/plain instead of text/html.

I already tried the following in my .htaccess file, but it did not seem to have any effect:

AddEncoding text/html .aspx

What's the right way to do this?

  • ask some interesting questions and you'll be upvoted in no time. – pQd Jan 16 '10 at 20:48

i think what you're after is not only Content-Encoding but also Content-Type; try putting AddType next to your AddEncoding:

AddType text/html .aspx

restart apache and check response headers.

  • That did it. Thank you so much! I would upvote you, but that requires 15 points of reputation. – Sandra Jan 16 '10 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.