Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Options +FollowSymLinks
RewriteEngine on
# beautiful addr/location bar
RewriteRule ^profile/(.*)/(.*)/?$ profile.php?id=$1&name=$2 [B]
# no need to see dem file ext.'s
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
# don't touch my git
RedirectMatch 404 /\.git
# disallow folder snoopin
Options All -Indexes
ErrorDocument 404
RewriteRule ^($ [R=301,L]
RewriteRule ^($ [R=301,L]
RewriteRule ^($ [R=301,L]
RewriteRule ^($ [R=301,L]
# e.g. inc/
deny from all
# best/simple
Require local
# meh
Require ip
Require ip ::1
# u old
Order deny,allow
Deny from all
Allow from ::1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment