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?
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
Re: rules for mod rewrite
it works! im using iit in the .htaccess
thx so much robert