# htaccess file for zenphoto
# NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.

<IfModule mod_rewrite.c>
RewriteEngine On

# !!! Change this to the absolute path !!!
RewriteBase /zp

RewriteRule ^zen/(.*)$                     - [L]
RewriteRule ^tests/(.*)$                   - [L]
RewriteRule	^admin$	                       admin/ [R]
RewriteRule	^admin/?$	                     zen/admin.php [R,L]
RewriteRule ^admin/admin.css$              zen/admin.css [R,L]
RewriteRule ^admin/admin.js$               zen/admin.js [R,L]

RewriteRule ^page/([0-9]+)/?$              index.php?page=$1 [QSA,L]
RewriteRule ^([^/\.]+)/?$                  index.php?album=$1 [QSA,L]
RewriteRule ^([^/\.]+)/page/([0-9]+)/?$    index.php?album=$1&page=$2 [QSA,L]
RewriteRule ^([^/\.]+)/image/(thumb|[0-9]{1,4})/([^/\\]+)$    zen/i.php?a=$1&i=$3&s=$2 [QSA,L]
RewriteRule ^([^/\.]+)/image/([^/\\]+)$    albums/$1/$2
RewriteRule ^([^/\.]+)/([^/\\]+)$          index.php?album=$1&image=$2 [QSA,L]

</IfModule>
