Posted by Justin Koivisto on 02/02/06 18:45
namemattersnot@msn.com wrote:
> Justin,
>
> Thank you for your elaborate answer. Perhaps im not doing something
> right, but here is what I get:
>
> [Thu Feb 02 11:08:15 2006] [error] [client 127.0.0.1] File does not
> exist: D:/system_programs/xampp/htdocs/gallery
>
> This is in response to my request:
>
> http://localhost/gallery/galleryname/?show_from=0&show_per_page=5
>
> That sould be processed with this rule:
>
> RewriteRule ^gallery/([^/]+)/([^/]+)$ /index.php?$2&gallery_name=$1
> [QSA]
>
> :) why?
^gallery/([^/]+)/([^/]+)$
match REQUEST_URI that:
* starts with literal "gallery/"
* followed by one or more characters that are not "/"
* followed by a "/"
* ends with one or more characters that are not "/"
Your request:
gallery/galleryname/
* starts with literal "gallery/"
* followed by one or more characters that are not "/"
* followed by a "/"
* DOES NOT end with one or more characters that are not "/"
You can modify the rule to accept this, or create a second rule, I opt
for modification:
RewriteRule ^gallery/([^/]+)(/([^/]+))?$ /index.php?$3&gallery_name=$1 [QSA]
HTH
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
[Back to original message]
|