View Single Post

  #2 (permalink)  
Old 11-16-2005
Robert Ionescu
 
Posts: n/a
Default 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