RSS

Protect website folders by .htaccess

06 Aug

<IfModule dir_module>
DirectoryIndex index.html index.php index.php4 index.php3 index.cgi index.pl index.htm index.shtml index.phtml
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_URI} !(css)
RewriteCond %{REQUEST_URI} !(js)
RewriteCond %{REQUEST_URI} !(images)
RewriteCond %{REQUEST_URI} !(videos)
RewriteCond %{REQUEST_URI} !(cache)

</IfModule>

Advertisements
 
2 Comments

Posted by on August 6, 2009 in LAMP, php, Tips, Tricks

 

Tags: , , , ,

2 responses to “Protect website folders by .htaccess

  1. johnny

    August 7, 2009 at 4:18 am

    Hello. Thank you for this great info! Keep up the good job!

     
  2. teinby

    August 10, 2009 at 7:30 am

    thank you! I really liked this post!

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: