2 # copyright 2012,2013 Arun Persaud <arun@nubati.net>
4 # This file is part of photo-tags.
6 # Photo-tags is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # Photo-tags is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Photo-tags. If not, see <http://www.gnu.org/licenses/>.
19 <IfModule mod_rewrite.c>
22 RewriteBase /<insert web base url here>
24 # hide git directory (and others)
25 RedirectMatch 404 \.(git|cvs|svn|bzr|hg)(/.*|$)
27 # use autoversioning of js and css files
28 RewriteRule ^(.*)\.[[:xdigit:]]{32}\.(css|js)$ $1.$2 [L]
31 ### make the url nice and clean; the comments shows an url that should be matched
33 # web_base/tag/me+berlin/pic/id
34 RewriteRule tag/([-_\s,a-zA-Z0-9+]*)/pic/([0-9]*) index.php?tag=$1&pic=$2 [L]
36 # web_base/tag/tag1+tag2/page/4
37 RewriteRule tag/([-_\s,a-zA-Z0-9+]*)/page/([0-9]*) index.php?tag=$1&page=$2 [L]
39 # web_base/tag/tag1+tag2
40 RewriteRule tag/([-_\s,a-zA-Z0-9+]*) index.php?tag=$1 [L]
43 RewriteRule pic/([0-9]*) index.php?pic=$1 [L]
46 RewriteRule page/([0-9]*) index.php?page=$1 [L]