Knowledge Database

Everything you ever wanted to know. (well almost...)

Didn't find what you we looking for?
Why not ask one of our online staff or drop us a message!

Tutorials > Advanced Web Hosting, PHP > .htaccess Config Files



.htaccess Config Files

.HTAccess allows you to configure parameters for your webhosting account to use apache features to customise various aspects of file access, directory access, indexes and more. You can create you .htaccess file through MyRSAWeb. Be careful not to overwrite it! You can also create your own passworded directories with .htaccess, but we suggest you use the MyRSAWeb Control Panel to achieve this.
  • A .htaccess file must be a plain text file.
  • A .htaccess file contains server directives, one per line.
  • A .htaccess file applies server directives to a directory as well as its subdirectories.
  • A .htaccess file in a subdirectory overrides any .htaccess files found in its parent directories.
  • Each line in a .htaccess file that starts with a # symbol is ignored.
Here is a one line .htaccess file used to redirect "404 Not Found" responses to a specific Web page:

ErrorDocument 404 /webdemo/404.html

Possible .htaccess errors:

Make sure you are creating your .htaccess file from the MyRSAWeb Control Panel, this will simplify and take the hassle away from having to make sure you don't overwrite the file.

NOTE: If your .htaccess file has a single error in it, your website may not even display!

In this event, remove the .htaccess file from your web hosting acount to restore things back to normal. You could also overwrite it with a blank .htaccess file.

Similar Information from this category