Introduction to .htaccess

.htaccess is a Unix/Linux based file for Apache web servers that allow you to change access permissions and many other things for files on your web server.

To make a .htaccess file, open up an html editor, preferably notepad, and enter your commands(each on a seperate line). When saving your file in Notepad, enter .htaccess as the file name and choose All Files for save as type. It is very important that you don't save it as a .txt file.

htaccessWhen the .htaccess file is placed in the root directory, it will also affect all other directories below it. If you place it in a subdirectory it will affect all the files of that directory. Note that any .htaccess file in the root directory will override those in subdirectories.

When uploading your .htaccess file through ftp, make sure you are in ASCII mode, not binary. Most web servers will hide all of the files that start with a period. In order to view your .htaccess file in ftp, your will need to place -la or -al as shown to the left using WS_FTP. If you are using an ftp other then WS_FTP, you may need to check your help files to find out what method you need to use.

In order to prevent others from viewing the contents of your .htaccess file, place the following in the file.

<Files .htaccess>
order allow,deny
deny from all
</Files>

Close    To Top
  • Prev article-webmaster:
  • Next article-webmaster:
  • Now: Tutorial for Web and Software Design > Webmaster > Web Hosting > webmaster Content
    Photoshop Tutorial
     

    Special Effect

      3D Effect
      Photoshop Articles
    Programming Tutorial
     

    C/C++ Tutorial

      Visual Basic
      C# Tutorial
    Database Tutorial
     

    MySQL Tutorial

      MS SQL Tutorial
      Oracle Tutorial
    Geek Tutorial
     

    Blogging Tutorial

      RSS Tutorial
      Podcasting Tutorial
    Graphic Design Tutorial
      Coreldraw Tutorial
      Illustrator Tutorial
      3D Tutorials
    Webmaster Articles
     

    Domain Service

      Web Hosting
      Site Promotion
    Java Tutorial/ Articles
     

    Java Servlets

      JavaEE Tutorial
     

    JavaBeans Tutorial

    XML Tutorial/ Articles
     

    XML Style

      AJAX Tutorial
      XML Mobile
    Flash Tutorial/ Articles
     

    Flash Video

      Action Script
      Flash Articles
    OS Tutorial/ Articles
      Linux Tutorial
      Symbian Tutorial
      MacOS Tutorial
    Personal Tech
      Hardware Tutorial
      Software Tutorial
      Online Auction