Reputation: 1323
I've checked the regexs and they all match but for some reason its not working in mod_rewrite?
I would like
http://www.system.com/chips/intel?c=xxx
to read:
http://www.system.com/chips/intel/xxx
I have:
RewriteCond %{REQUEST_URI} (c=.*)$
RewriteRule (/([^/]+)/?).*?c=(.*) http://%{SERVER_NAME}/$1/$2/ [L]
And I'm getting an error. What's going on here?
Upvotes: 0
Views: 132
Reputation: 97805
Your regular expression doesn't match that URL. As you have it:
/chips/
chips
xxx
You probably want something like:
RewriteRule ^/([^/]+)/([^/]+)\?c=([^&]*) http://%{SERVER_NAME}/$1/$2/$3 [R=301]
Upvotes: 1
Reputation: 5728
Don't think rewritecond get's the uri params unless you have "QSA"
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
Upvotes: 0