LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-08-2008, 08:12 PM   #1
MicahCarrick
Member
 
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 mod_rewrite isn't working vargadanis Linux - Server 3 11-09-2009 08:21 PM
mod_rewrite not working in Slack 10 -10.1 Bwongar Slackware 3 01-16-2009 01:53 PM
Help with mod_rewrite MicahCarrick Linux - Software 3 05-23-2007 08:09 PM
mod_rewrite mr_dizzle Linux - General 1 02-02-2006 07:32 PM
Apache mod_rewrite not working? KillerCheeto Linux - Software 2 05-23-2004 10:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration