| 10:02 pm on Apr 27, 2006 (gmt 0)|
Can you give an example of the URL (without your domain name of course) that is represented by the left-hand side of your rewrite?
I have absolutely no problems with something like this:
Being turned into
RewriteRule ^(.*)/(.*)/catid(.*) /script.cgi?STUFF=$1&THING=$2&CAT=$3 [L]
It looks like you may be trying to do a similar thing but are using ([^/]+) instead of (.*).
| 11:04 pm on Apr 27, 2006 (gmt 0)|
just seems that on the last one the city_id works, but the first two sets don't
| 11:45 pm on Apr 27, 2006 (gmt 0)|
RewriteRule ^lots/([^/]+)/([^./]+)/?$ /lots.php?city_id=$1&lot_id=$2 [L]
I do notice you have a . in the last one and not in the first one. ([^/]+) vs ([^./]+) . I believe that "." is "any character", so by leaving it out, you may be breaking your rule. You could also just try:
RewriteRule ^listings/(.*)/(.*)/?$ /listings.php?city_id=$1&listing_id=$2 [L]
I'm no mod_rewrite guru, but I think the above would work. Or maybe it's just the missing ".".
| 11:59 pm on Apr 27, 2006 (gmt 0)|
its still making its error, even with changing it as you have.
when I go to /listings/city/number the page displays none of the $_GET variables so they are not getting passed as they should be. Same with /lots/city/number, but yet with subdivision/city/number they get passed.
in each file, listings.php, lots.php and subs.php I just have an echo statement to show each of the variables from the query string.
| 5:22 pm on Apr 28, 2006 (gmt 0)|
I don't see anything wrong with the original code, although as JollyK has pointed out, you don't need the "." in the grouped excluded characters.
Using a specific pattern like ([^/]+) is much more efficient than using (.*) when more than one sub-pattern is used. (See this post [webmasterworld.com] for details.)
Have you tried requesting any of the URLs that don't work, but with a trailing slash? Does that make any difference?