Htaccess and mysql photo album.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi there,

I've posted the following question elsewhere,
but got no response, and there seems to be no
special htaccess-group, so i took the liberty
to post it here. Hope y'all dont mind.

I have a site with a photo album on it.
Albums are stored in a MySQL db.
I use a site with a standard layout, with
an iframe in it, where the content is presented.

To the visitor albums appear to have the
following url:
The last three parts are variable,
and it's translated to

That's the url of the main layout. The page
in the iframe has the same, except then index.html
behind it. (
Hope it's still clear.

Because the album name is variable i use the following
in the htaccess file:
RewriteRule ^photos/([0-9]+)/(.*)/([0-9]+)(/)?$

BUT!! because of the '(.*)' part, it keeps looping when i call
the iframe's url because photos/5/bla AND photos/5/bla/index.html 'are
both (.*)'.
Does anyone know how to prevent this? Does it make a difference if i
the *.index.html rule before the other in the htaccess?

Sounds rather complicated i guess, but i don't really know how to
explain it different.

Thanks in advance!

Re: Htaccess and mysql photo album.

On Tue, 21 Jun 2005 02:09:28 -0700, frizzle wrote:

Quoted text here. Click to load it

RewriteRule ^photos/([0-9]+)/(.[^/])/([0-9]+)(/)?$

or similar any use?

Re: Htaccess and mysql photo album.

I'm sorry, i don't quite understand what you mean ...
And what does '(.[^/])' do?


Re: Htaccess and mysql photo album.

*** frizzle wrote/escribió (23 Jun 2005 08:20:27 -0700):
Quoted text here. Click to load it

One character (any) plus one character (any except /).

-- Álvaro G. Vicario - Burgos, Spain
-- - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group

Site Timeline