View Single Post
Old 7th February 2013, 13:58
flyingmg flyingmg is offline
Junior Member
Join Date: Jan 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up 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:

RewriteCond %{REQUEST_URI} ^/
RewriteCond %{HTTP_COOKIE} ^.*ServerName=([^;]+)
RewriteRule /(.*)$1 [P]
does the trick.
Hope this helps somebody...
Reply With Quote