LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Help with mod_rewrite - [L] not working (https://www.linuxquestions.org/questions/programming-9/help-with-mod_rewrite-%5Bl%5D-not-working-640931/)

MicahCarrick 05-08-2008 08:12 PM

Help with mod_rewrite - [L] not working
 
I am trying to have some mod_rewrite rules for a simple little site. I have the following:

Code:

# SEARCH REWRITES
RewriteRule ^search/$ /qs/search.php [L]
RewriteRule ^search/(.*)/(.*)/$ /qs/search.php?q=$1&page=$2[L]

# PRODUCT REWRITES
RewriteRule ^(.*)/(.*).html$ /qs/index.php?product_slug=$2 [L]

# CATEGORY REWRITES
RewriteRule ^(.*)/$ /qs/index.php?category_slug=$1 [L]


What I want, is if the search rewrites match, then that's the end of it. However, what's happening is it continues through and tries to apply the category rewrite as well. I thought the [L] flag would prevent that but it doesn't seem to help.

Ideas?


All times are GMT -5. The time now is 12:59 PM.