Forum Moderators: phranque

Message Too Old, No Replies

simple mod rewrite

         

patrick campbell

9:34 pm on Apr 13, 2005 (gmt 0)



I am a little slow with this mod_rewrite stuff. I need basically something very simple

IF THE URL CONTAINS the string "brand=12345", then send it to www.whatever.com/some/external/site

I've tried something like

RewriteEngine On
RewriteRule ^brand=12345$ "http://www.google.com"

But this isn't working, I know I'm not doing this right but don't know how to fix it.

The URL will contain a lot more than brand=12345, but the rest of the url is not pertinent because no matter what ELSE it contains, if it has brands=12345 anywhere in it, it needs to go to the other external site.

Thanks and sorry for such a dumb question.

sitz

10:23 pm on Apr 13, 2005 (gmt 0)

10+ Year Member



RewriteRule doesn't see query strings; in order to Rewrite based on a query string, you'll need to use RewriteCond. Check the archives [google.com] for specifics.