Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
ask some interesting questions and you'll be upvoted in no time. – pQd Jan 16 '10 at 20:48
up vote 1 down vote accepted

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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