Customizing rewrite url

carminejg3

Joined: 2003-04-22
Posts: 16
Posted: Mon, 2006-05-15 21:23

Gallery 1.5 apache 2.0

Hi I've been tring to customize the short url rewrites that my gallery puts out.

Currently it ends link so /albumname/imagename

I'd like it to end as /albumname/imagename.html

would i change this in the .htaccess file?

Options -Indexes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([0-9]+)$ /view_photo.php?set_albumName=$1&index=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$ /view_photo.php?set_albumName=$1&id=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/$ /$1 [R]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)$ /view_album.php?set_albumName=$1 [QSA]
</IfModule>
# END Gallery section. Add User changes below this line

or is there somewhere else I need to set this up?

Also is there a way to change the next page rewrite to something like this.

instead of http://site.com/albumname?page=18

to something like http://site.com/albumname/page18.html or http://site.com/albumname/page18/