Generating a redirect based upon a captured query string value on httpd
Issue
-
I'm trying to capture a query string in a RewriteCond and generate a redirect based upon that value like below but it doesn't work:
RewriteCond %{QUERY_STRING} ^foo=(.*)$ [NC] RewriteRule ^/bar/index.html$ http://redirected.com/to/$1 [NE,R=301,L]
Environment
- Red Hat Enterprise Linux (RHEL)
- JBoss Enterprise Web Server (EWS)
- Apache httpd
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.