This is a discussion on rules for mod rewrite within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi there.. im building a fotolog system and i have two rules. but.. online matchs the 2nd. can you check ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 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 |
| Thread Tools | |
| Display Modes | |
|
|