Forum Moderators: phranque

Message Too Old, No Replies

RewriteCond not working. why?

So simple, but can't see it for the life of me.

         

curlybill09

4:34 pm on Feb 26, 2007 (gmt 0)

10+ Year Member



Hey guys,

I have a rewritecond that just doesn't seem to be working for me, thought I would see if anyone here could shine some light on what it is I am doing wrong:

RewriteCond %{REQUEST_URI}!^(Search¦Sort)
RewriteRule ^([A-Z][a-z]+([-]?[A-Z][a-z]+)?)/([^/\.]+)-([1-9]+)/?$ page.php?r=$4 [L]

Basically (in pseudo-speak), I want to ask... "If the requested URI does NOT start with 'Search' or 'Sort', then process the following rewriterule."

Problem is, the rewriterule is still working even if the REQUEST_URI starts with 'Search' or 'Sort'. This is an .htaccess so no leading / necessary. And the RewriteBase is spot on.

Any ideas?

jdMorgan

10:36 pm on Feb 26, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need a leading slash:

RewriteCond %{REQUEST_URI} [b]!^/(S[/b]earch¦Sort)

Jim