HostGator.com » Support Portal

Apache Directives for .htaccess

Here is a list of the Apache Directives you can use in the .htaccess file.

  • AddCharSet: Maps the given filename extensions to the specified content charset.
  • AddEncoding: Maps the given filename extensions to the specified encoding type.
  • AddHandler: Maps the given filenames extension to a specific handler name.
  • AddLanguage: Maps the given filename extension to the specified content language.
  • AddType: Maps the given filename extension onto a specified content type.
  • DefaultLanguage: Tells Apache that all files in the directive’s scope that don’t have an explicit language extension should be considered to be in the specified MIME-lang language.
  • ForceType: Forces all matching files to be served as a specific content type.
  • RemoveEncoding: Removes any encoding associations for files with the given extensions.
  • RemoveHandler: Removes any handler associations for files with given extensions.
  • RemoveType: Removes any MIME type associations for files with the given extensions.
  • SetHandler: Forces all matching files to be parsed through a specific handler.

Article Comments

tal
what about DirectoryIndex
where am i able to change that

HostGator
That code also belongs in the .htaccess file.

Jeff McElhattan
I'm trying to create more SEO friendly URL's for my shopping cart. To do this, I'm using a typeless file for my application and forcing php recognition like this:

<Files products>
ForceType application/x-httpd-php
</File>

However, when I attempt to link to file, http://domain.com/products, it tries to download the file rather than run it.

Please advise.

HostGator
That is likely the result of incorrect coding. Please check the syntax required for ForceType and try again.

HostGator
Thank you for your comments. Just a quick reminder that the comments on this page are not monitored by technical support staff, and that for support issues, it is best to contact us by live chat, phone or email so we can assist you right away.

Although comments are not monitored by technical support staff, they are moderated and read by technical writers. Comments will need to be approved by a moderator before appearing.

Our technical writers do read the comments periodically for the purposes of updating the articles, and do appreciate your feedback, suggestions and corrections to the articles themselves, as well as any suggestions or tips for readers of this article. However, support questions posted here are not guaranteed to be replied to in a timely manner or at all. For support issues, it is best to contact our support staff instead by live chat, email or phone.



Your comments help us keep the knowledge base updated. This is not a medium for support. If you have questions or need help, please contact us via email, phone or live chat for fast assistance.

Post Comment