Using cookie content as RewriteRule variable in Apache ReverseProxy
I want to build a specific URL depending on the content of a cookie.
This is how I get my cookie:
Now I'd like to:
1. check wether the cookie is set (without knowing its content). I was not able to achieve that until now and actually set a second cookie (aCookie in my example above) and check for its content as a first condition. Does the first line of my example below achieve that? I couldn't verify that until now...
2. use the content of the cookie ServerName to build subsequent URLs
I thought, that I could build something like:
Any hints would be greatly appreciated.
My question is related to Apache 2.4 as reverse proxy on ubuntu 12.04.1
Meanwhile I could figure out how to access to the content of the cookie. But I am still stuck with a RewriteCond that should just check wether the cookie is set or not, independnatly from its content. The content should be used as a result of the condition being fullfilled and putting it into %1.
After some google search, I found several example how to check for some content and changed it, so that I thought it should match my needs. Unfortunatly, it does not work as desired until now.
My rewrite condition and rule looks actually like that:
Any hint would be greatly apreciated. :)
SOLVED: Using cookie content as RewriteRule variable in Apache ReverseProxy
Just to close this thread and tag it as solved, if somebody is looking for a solution for a similar problem.
Here is the solution:
If have a cookie named ServerName, I want to check for its availability and use its content for building a URL:
Hope this helps somebody... :)
|All times are GMT +2. The time now is 17:56.|
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.