1and1 Help Centre Categories

print article

Modify the Webserver Configuration (httpd.conf)

You are not able to make changes to Apache webserver configuration via a httpd.conf file. There is a default httpd.conf file already in place for a default configuration for all customers. To make changes to the webserver configuration, you will need to create a .htaccess file.

Using this method you can make specific changes to the webserver configuration such as enabling file/folder listing publicly, define custom error pages, redirect incoming traffic, etc. In this way, you can make changes that will only affect your websites. The .htaccess file is recursive meaning that the configuration settings within the file will apply the the folder where the .htaccess file is saved as well as subfolders and files.

The following is a list of directives which can be used in a .htaccess file:

Command Description
ErrorDocument Define your own custom error pages
AddType Assign a MIME-Type to a file ending
RewriteEngine Activate mod_rewrite module
Allow/Deny Host or IP based access control
FilesMatch File based access control
AuthType "Basic" password check
Redirect Redirection to another page or site
Options (de)activate index, symbolic links, etc.

Some examples

Enable file/folder listing:
Options +Indexes

Turning "spell checking" off. This is on by default and will therefore load http://domain.com/file.html if http://domain.com/file1.html does not exist
CheckSpelling off

Allow other file extensions to be handled as CGI scripts:
AddHandler cgi-script .cgi .asp

Allow other file extensions for SSI (Server Side Include) scripts:
AddType text/x-server-parsed-html .shtm .shtml .htm .html

Please note:
Disclaimer: 1&1 provides the scripts and related information on this page as a courtesy, subject to 1&1's General Terms and Conditions of Service. As set forth in more detail in the GT&C, the scripts and information are provided without any warranty, and 1&1 is not liable for any damages resulting from your use of the scripts or information.
For additional information, you may want to reference: