|
Hi all, i have some questions about .htaccess file
Can I use the following .htaccess file to secure my site... I was wondering is it right syntax?
may I use the contents into my .htaccess file as it is? or I must un-comment the sections?
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !^index.html [NC]
RewriteCond %{REQUEST_FILENAME} !^page2.html [NC]
RewriteCond %{REQUEST_FILENAME} !^page3.htm [NC]
RewriteCond %{REQUEST_FILENAME} !^page4.php [NC]
RewriteCond %{REQUEST_FILENAME} !^page5.shtml [NC]
RewriteRule ^index/(.*)$ /index?page=$1
#Options All -Indexes
IndexIgnore *
# protect myadmin.php
<files myadmin.php>
order deny,allow
deny from all
allow from my 126.123.12.5
</Files>
# Protect the .htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>
# Protect config.inc.php
<files config.inc.php>
order allow,deny
deny from all
</files>
Thanks for any help.
Last edited by paldev77; 12-11-2007 at 04:02 AM..
|