Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

Htaccess guide & tricks Donate at flattr Flattr this

Alert! Connect with 10,000 Chating Online. Join Now

What is a .htaccess File?

A htaccess file is a configuration file that allows web servers like Apache to perform special functions when serving a HTML, php , asp, shtml pages etc. ".htaccess file" is a plain-text file that is save as .htaccess without any extra characters before or after the name of the file.

How to create create a htaccess file

.htaccess files are created by using a text editor on the server or by using notepad and save the filename as ".htaccess" . Just create your first .htaccess file by going to your server, in the file manager, click on new page and enter .htaccess as the file filename. That will create your htaccess file.

You can also create a htaccess file by using a text editor like notepad, click on file saveas and type ".htaccess" as file name with the quotation marks around the htaccess that will create you an empty htaccess file.

Note - Applying .htaccess to Folders and Sub-Folders

Htaccess file controls the folder it resides on. This allows you to specify custom settings on a per directory basis if you really want it. Your .htaccess file doesn't need to be in the root directory of your web server. You can put it in any directory, and the settings specified by that .htaccess file applies to the current directory as well as any subdirectories

.htaccess file can be used to handle all kinds of cool tricks on the server that you probably never see.

Editing a .htaccess File

If you already have a .htaccess file, you can edit your htacces file just the way you edit files on the sever, select your htaccess file and click on edit to edit it.

What is a .htaccess File?

Custom Error Pages

IP Blocking

Change Non WWW URLs to WWW URLs

Turning On Compression using GZIP

SEO 301 Redirect

Change the Default Directory Page/index file

How to Stop Directory Listing

How to stop someone looking at your htaccess file

Password Protect a Directory

Control access at files & directory level

Modifying the Environment Variable

Implementing server Caching Scheme with .htaccess

Redirect browser to https (ssl)

Rewrite URLs using htacccess

Adding new MIME types)

Specify Upload file limit for PHP in htaccess

Disallow Script Execution

Change Charset and Language headers

Set Timezone of the Server (GMT)

Force "File Save As" Prompt and File download

Protecting a single file

Set Cookie using htaccess

Send Custom Headers

Blocking request based on User-Agent Header

Disable caching for certain file type

Hotlinking protection with .htaccess

Prevent hacks

Disable directory browsing

Rename .htaccess files to another filename

Change default Index page

Block unwanted visitor based on referring domain

Secure directories by disabling execution of scripts

All the tutorials on this site are free, you can copy and print the tutorials and code on this site, but you are not allowed to reproduce this information on another website.

Css Generator    Htaccess Generator    Percentage Calculator   Area conversion

Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online