rules for mod rewrite

Hi there.. im building a fotolog system
and i have two rules. but.. online matchs the 2nd.
can you check it out?

RewriteRule ^/imagenes/(.*?)-(.*?)\.jpg$
/imagen.php?IDpublicacion=$1&tamano=$2 [L]
RewriteRule ^(.*)$ fotolog.php?usuario=$1

the first rule is to rewrite url to get images
the second rule is to ser user directory
such like www.mysite.com/user

the problema is i whant to do also
www.mysite.com/imagenes/100-1.jpg

but only the 2d rule match

any ideas?
dieguicho [ Mi, 16 November 2005 16:51 ] [ ID #1060209 ]

Re: rules for mod rewrite

dieguicho wrote:
>
> RewriteRule ^/imagenes/(.*?)-(.*?)\.jpg$
> /imagen.php?IDpublicacion=$1&tamano=$2 [L]
> RewriteRule ^(.*)$ fotolog.php?usuario=$1
>
[...]
> the problema is i whant to do also
> www.mysite.com/imagenes/100-1.jpg
>
> but only the 2d rule match

Where are you using the rules? In httpd.conf or .htaccess?

The pattern in .htaccess files does not start with a leading slash:

RewriteRule ^imagenes/([^-]+)-([^-]+)\.jpg$
/imagen.php?IDpublicacion=$1&tamano=$2 [L]

RewriteRule ^([^/.]+)$ /fotolog.php?usuario=$1 [L]

--
Robert
Robert Ionescu [ Mi, 16 November 2005 17:39 ] [ ID #1060210 ]

Re: rules for mod rewrite

it works! im using iit in the .htaccess
thx so much robert
dieguicho [ Mi, 16 November 2005 23:03 ] [ ID #1060218 ]
Webserver » alt.apache.configuration » rules for mod rewrite

Vorheriges Thema: Apache/2.0.54 mod_usertrack cookies
Nächstes Thema: Apache 1.3 Virtual Hosting Problems