/photogallery/tools/mod_rewrite.htaccess
0,0 → 1,33
# WHAT YOU NEED TO EDIT
#
# There are just two things you need to edit to make this file work on your
# installation. On each of the two lines below starting 'RewriteRule' about
# half way along the line there is a '/singapore/'. Change this to the full
# path to your installation (e.g. the bit after the .com, .org or whatever)
# then rename this file to .htaccess and put it in the singapore root
# directory (the one containing thumb.php). Finally don't forget to turn on
# use_mod_rewrite and update the base_path in singapore.ini. Voila!
 
 
Options +FollowSymlinks
RewriteEngine On
 
# rewrite galleries
# url must end in / and gallery names must not contain commas (,)
# example: /singapore/gallery/subgallery,20/
# becomes: /singapore/index.php?gallery=gallery/subgallery&startat=20
RewriteRule ^([^,]+)(,([0-9]+))?/$ /singapore/index.php?gallery=$1&startat=$3&%{QUERY_STRING} [ne]
 
# rewrite images
# do not rewrite requests to files and directories that really exist
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
 
# example: /singapore/gallery/subgallery/myphoto.jpeg
# becomes: /singapore/index.php?gallery=gallery/subgallery&image=myphoto.jpeg
RewriteRule ^((.*)/)?([^/]+\.(jpeg|jpg|jpe|png|gif|bmp|tif|tiff))$ /singapore/index.php?gallery=$2&image=$3&%{QUERY_STRING} [ne,nc]
 
# rewrite feed.xml to the rss template
# example: /singapore/gallery/feed.xml
# becomes: /singapore/index.php?gallery=gallery&template=rss
RewriteRule ^((.*)/)?feed.xml$ /singapore/index.php?gallery=$2&template=rss&%{QUERY_STRING} [ne]