Sign up to create your own snipts, or login.

Public snipts » robertbanh's snipts » My Custom .htaccess file

posted on Dec 08, 2009 at 10:21 a.m. EST in 
  • RewriteEngine On
    #comment out the options followsymlinks when in prod
    #Options +ExecCGI +FollowSymLinks
    RewriteBase /rbanh/blah/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [L,QSA]
    
    # prevent directory browsing
    Options -Indexes
    
    <FilesMatch "\.(htaccess|svn|xml|inc|.*sql|cache_|.*~)$">
        deny from all
    </FilesMatch>
    

    copy | embed

0 Comments

Sign up, or login to leave a comment.