summaryrefslogtreecommitdiffstats
path: root/htaccess_template
blob: aa6f5a762375599b0ea26bca5ac04882339aa6ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<IfModule mod_rewrite.c>
RewriteEngine on

RewriteBase   /<insert web base url here>

# hide git directory (and others)
RedirectMatch 404 \.(git|cvs|svn|bzr|hg)(/.*|$)


# make the url nice and clean; the comments shows an url that should be matched

# web_base/tag/me+berlin/pic/id
RewriteRule tag/([-_\s,a-zA-Z0-9+]*)/pic/([0-9]*) index.php?tag=$1&pic=$2 [L]

# web_base/tag/tag1+tag2/page/4
RewriteRule tag/([-_\s,a-zA-Z0-9+]*)/page/([0-9]*) index.php?tag=$1&page=$2 [L]

# web_base/tag/tag1+tag2
RewriteRule tag/([-_\s,a-zA-Z0-9+]*) index.php?tag=$1 [L]

# web_base/pic/17
RewriteRule pic/([0-9]*) index.php?pic=$1 [L]

# web_base/page/4
RewriteRule page/([0-9]*) index.php?page=$1 [L]


</IfModule>