Forum Discussion
Dave_Horsey_225
Nimbostratus
Mar 10, 2006Rewrite URL and change pool trouble
I have been working on a irule to rewrite the URL to do the following:
User sends http://www.sitename.com/blog
bigip changes the url to http://blog.sitename.com/ and redirects the ...
Dave_Horsey_225
Nimbostratus
Mar 15, 2006I think I am getting very close....
Here is the iRule so far:
when HTTP_REQUEST {
if { ([HTTP::uri] starts_with "/blog") and
!([HTTP::uri] starts_with "/blogs/menopauseinsight") } {
HTTP::uri "/blogs/menopauseinsight[string range [HTTP::uri] 5 end]"
}
if { [HTTP::uri] contains "blog" } {
HTTP::header replace "Host" "cs.geosign.com"
}
if { [HTTP::uri] contains "Utility" } {
HTTP::header replace "Host" "cs.geosign.com"
}
if { [HTTP::uri] contains "blog" } {
pool MIS-WEB21-CS
} else {
pool MIS-WEB20-4
}
}
The only problem that I have now is that the blog server cs.geosign.com uses style sheets. The other requests get requests that I need to have redirected are:
/Themes/Blogs/marvin3/style/print.css
/Utility/global.js?Version=2.0.60217.2664
/utility/EULA.GIF
These extra get requests don't seem to get caught by my uri contains rules? Therefore, they go to the wrong server.
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
