Forum Discussion
marcus_lindner_
Nimbostratus
Jan 11, 2006uri rewrite based on the servername
I am trying to come up with a rule where the server name of the uri is used to rewrite the URL. an example will be:
http://server_1.de/index.html <=> http://server_4.de/server1/index.html
http:/...
Jan 11, 2006
The URI isn't returned to the client in the HTTP response.
Here's how it works
1. client puts URL in browser (http://www.foo.com/path)
2. Browser extracts the components of the url and places them in the HTTP request
GET /path HTTP/1.1
Host: www.foo.com
User-Agent: ...
Accept: ...
...
And the response from the server looks like this:
HTTP/1.1 200 OK
Date: ...
Server: ...
Last-Modified: ...
Content-Length: xxxx
payload_goes_here
You'll see that the URL, host, path, etc are not included in the response.
If your server is embedding full links in the payload (which is what it looks like you are reporting), then you'll have to write some iRules in the HTTP_RESPONSE event to dig through the payload and basically do a search and replace.
I've highlighted a few examples of this on my blog (Click here)
Search for the "Modify uri" items.
Good luck!
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
