##  ********************************************
##  Coppermine Photo Gallery
##  ************************
##  Copyright (c) 2003-2007 Coppermine Dev Team
##  v1.1 originaly written by Gregory DEMAR
##  v1.2+ update by Makc666
##
##  This program is free software; you can redistribute it and/or modify
##  it under the terms of the GNU General Public License version 3
##  as published by the Free Software Foundation.
##  
##  ********************************************
##  Coppermine version: 1.4.13
##  $Source$
##  $Revision: 3837 $
##  $Author: gaugau $
##  $Date: 2007-08-16 18:56:06 +0200 (Do, 16 Aug 2007) $
##  ********************************************

# v1.44

Options FollowSymLinks SymLinksIfOwnerMatch

RewriteEngine on

#  Uncomment the following line if your webserver's
#  URL is not directly related to physical file paths.
#  Update "YOUR_COPPERMINE_ROOT" (just / for root)

#RewriteBase /YOUR_COPPERMINE_ROOT

#
# Rewrite index urls
#
RewriteRule index-([0-9]+)\.html index.php?cat=$1 [NC]

RewriteRule index-([0-9]+)-page-([0-9]+)\.html index.php?cat=$1&page=$2 [NC]

#
# Rewrite thumbnail urls
#
RewriteRule search-thumbnails-(.*)\.html thumbnails.php?album=search&search=$1 [NC]

RewriteRule thumbnails-lastupby-([0-9]+)\.html thumbnails.php?album=lastupby&uid=$1 [NC]

RewriteRule thumbnails-lastcomby-([0-9]+)\.html thumbnails.php?album=lastcomby&uid=$1 [NC]

RewriteRule thumbnails-lastupby-([0-9]+)-([0-9]+)-page-([0-9]+)\.html thumbnails.php?album=lastupby&cat=$1&uid=$2&page=$3 [NC]

RewriteRule thumbnails-lastcomby-([0-9]+)-([0-9]+)-page-([0-9]+)\.html thumbnails.php?album=lastcomby&cat=$1&uid=$2&page=$3 [NC]

RewriteRule thumbnails-([a-z0-9]+)-([\-]?[0-9]+)\.html thumbnails.php?album=$1&cat=$2 [NC]

RewriteRule thumbnails-([a-z0-9]+)-page-([0-9]+)-sort-([a-z]+)\.html thumbnails.php?album=$1&page=$2&sort=$3 [NC]

RewriteRule thumbnails-([a-z0-9]+)-page-([0-9]+)\.html thumbnails.php?album=$1&page=$2 [NC]

RewriteRule thumbnails-([a-z0-9]+)-([\-]?[0-9]+)-page-([0-9]+)\.html thumbnails.php?album=$1&cat=$2&page=$3 [NC]

RewriteRule thumbnails-([a-z0-9]+)\.html thumbnails.php?album=$1 [NC]

#
# Rewrite displayimage urls
#
RewriteRule displayimage-lastupby-([\-]?[0-9]+)-([\-]?[0-9]+)-([0-9]+)\.html displayimage.php?album=lastupby&cat=$1&pos=$2&uid=$3 [NC]

RewriteRule displayimage-lastcomby-([\-]?[0-9]+)-([\-]?[0-9]+)-([0-9]+)\.html displayimage.php?album=lastcomby&cat=$1&pos=$2&uid=$3 [NC]

RewriteRule displayimage-([\-]?[0-9]+)-fullsize\.html displayimage.php?pid=$1&fullsize=1 [NC]

RewriteRule displayimage-([a-z0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)\.html displayimage.php?album=$1&cat=$2&pos=$3 [NC]

RewriteRule displayimage-([a-z0-9]+)-([\-]?[0-9]+)\.html displayimage.php?album=$1&pos=$2 [NC]

RewriteRule displayimage-([0-9]+)\.html displayimage.php?pos=-$1 [NC]

RewriteRule slideshow-([0-9]+)-([\-]?[0-9]+)-([0-9]+)\.html displayimage.php?album=$1&pid=$2&slideshow=$3 [NC]

RewriteRule slideshow-([a-z]+)-([\-]?[0-9]+)-([0-9]+)-([0-9]+)\.html displayimage.php?album=$1&cat=$2&pid=$3&slideshow=$4 [NC]

#
# Rewrite users' profiles
#
RewriteRule profile-([0-9]+)\.html profile.php?uid=$1 [NC]

#
# Rewrite Rate this file
#
RewriteRule ratepic-([0-9]+)-([0-5])\.html ratepic.php?pic=$1&rate=$2 [NC]