add rule to hide .git file
[photo-tags.git] / htaccess_template
1 <IfModule mod_rewrite.c>
2 RewriteEngine on
3
4 RewriteBase   /<insert web base url here>
5
6 # hide git directory (and others)
7 RedirectMatch 404 \.(git|cvs|svn|bzr|hg)(/.*|$)
8
9
10 # make the url nice and clean; the comments shows an url that should be matched
11
12 # web_base/tag/me+berlin/pic/id
13 RewriteRule tag/([-_\s,a-zA-Z0-9+]*)/pic/([0-9]*) index.php?tag=$1&pic=$2 [L]
14
15 # web_base/tag/tag1+tag2/page/4
16 RewriteRule tag/([-_\s,a-zA-Z0-9+]*)/page/([0-9]*) index.php?tag=$1&page=$2 [L]
17
18 # web_base/tag/tag1+tag2
19 RewriteRule tag/([-_\s,a-zA-Z0-9+]*) index.php?tag=$1 [L]
20
21 # web_base/pic/17
22 RewriteRule pic/([0-9]*) index.php?pic=$1 [L]
23
24 # web_base/page/4
25 RewriteRule page/([0-9]*) index.php?page=$1 [L]
26
27
28 </IfModule>