Selasa, 12 Juli 2011

.htaccess

.htaccess is a simple  ASCII  file that make for protect directory web, block ip address and many things that you can do with .htaccess like :

  • redirecting a domain without access WWW to WWW
the configuration file like below :
 
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domainanda.com [nc]
rewriterule ^(.*)$ http://www.domainanda.com/$1 [r=301,nc]

  • prevent others to see .htaccess and the other files

order allow,deny
deny from all

if you want to prevent for access other file change .htacces name with other name.

  • changing error message
if you want to change server page error. you can using .htaccess to defines your own error message .
 
 syntax error example :

ErrorDocument 500 /error.html

change error.html with your own error page.

and many other you can do with .htaccess

Tidak ada komentar:

Posting Komentar