# 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
# the use_mod_rewrite option 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 the following directories
# if you wish to have galleries named 'docs', 'galleries', 'templates' or 'tools'
# simply supply the full path to singapore below. e.g.: !$/singapore/docs/
RewriteCond %{REQUEST_URI} !/docs/ 
RewriteCond %{REQUEST_URI} !/galleries/ 
RewriteCond %{REQUEST_URI} !/templates/ 
RewriteCond %{REQUEST_URI} !/tools/

# 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] 
