Created
April 30, 2010 13:45
-
-
Save philsturgeon/385220 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
Options +FollowSymLinks | |
RewriteEngine on | |
# NOTICE: If you get a 404 play with combinations of the following commented out lines | |
#AllowOverride All | |
#RewriteBase /wherever/ci/is | |
# Keep people out of codeigniter directory and Git/Mercurial data | |
RedirectMatch 403 ^/(application\/cache|codeigniter|\.git|\.hg).*$ | |
# Send request via index.php (again, not if its a real file or folder) | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
<IfModule mod_php5.c> | |
RewriteRule ^(.*)$ index.php/$1 [L] | |
</IfModule> | |
<IfModule !mod_php5.c> | |
RewriteRule ^(.*)$ index.php?/$1 [L] | |
</IfModule> | |
</IfModule> |
Huh, .svn? What is this crazy old tech you speak of?
I avoided that as it would need another rule, .svn could be any damn place within the web directory, not just at the root level.
If that's how you feel about svn, then enjoy this:
RewriteRule ^.svn/(.*)$ http://git-scm.com/ [R]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What about hiding .svn folders as well? ;)