What is .htaccess

Hello,

“.htaccess” is the default configuration file that contains rules with “server directives” that tell the server how to execute the URL .

Verious redirection, php configurations overwrite rules are executed from .htaccess

.htaccess file is also used to restrict access (password-protection) to specific files or directories on the Internet.

With .htaccess we can do the following settings like

Enable Directory Browsing

Options +Indexes

Disable Directory Browsing

Options All -Indexes

Change Default Page (order is followed!)

DirectoryIndex myhome.htm index.htm index.php

Redirect Visitors to New Page/Directory

Redirect oldpage.html http://www.yourdomainname.com/page.html
Redirect /olddir http://www.yourdomainname.com/dir/

Block Users from accessing the site



order deny,allow
deny from 192.68.20.1
deny from 202.147.2.10
deny from .spammers.com
allow from all

Block site from specific referrers

RewriteEngine on
RewriteCond %{HTTP_REFERER} sitename.com [NC]
RewriteCond %{HTTP_REFERER} sitenamehere.com [NC]
RewriteRule .(gif|jpg)$ - [F]

Grant CGI Access in a directory

Options +ExecCGI AddHandler cgi-script cgi pl # To enable all scripts in a directory use the following # SetHandler cgi-script

Also you can cusomize your rules with .htaccess

Related Posts:

  • No Related Posts


Online 24X7 Chat Support
 
 
Telephone
Toll Free
Online chat
 
Online 24X7 Email Support
 
Emails
 
 
 
Support
Support email
sales
Sales email
 
Billing
Billing email
 
   
Latest Tutorials & Articles (Updated Daily)
http://blog.eukhost.com
  Forums :
http://www.eukhost.com/forums/