Forum Discussion
JCMATTOS_41723
Nimbostratus
Jan 09, 2008ProxyPass iRule?
We have dual LTM's 9.4.1. We are trying to rewrite the url so that users will see http://xyzcompany/ in the url instead of http://123company/. We tried using the ProxyPass iRule sample:
http://devcentral.f5.com/wiki/default.aspx/iRules/ProxyPass.html
Everything works like a charm except for two things? The 1st is it adds an extra whack "/" at the end of the url? Example: http://xyzcompany// not sure why? 2nd question is, the irule works fine until you access a third party hyperlink within the site? Example: http://zyxcompany/
In our Data Group List we have it currently set to:
"/ xyzcompany/"
Please help!
5 Replies
- Colin_Walker_12Historic F5 AccountCould you please past in a copy of you current rule so we can take a look?
Thanks,
Colin - Deb_Allen_18Historic F5 AccountThe 1st is it adds an extra whack "/" at the end of the url? Example: http://xyzcompany// not sure why?Did you see this note buried deep in the documentation for the ProxyPass iRule about when not to specify a trailing slash in your class member entries?One thing that needs to be clarified is the usage of a trailing forward-slash in the examples above. Unless you really know what you are doing and are trying to do something unusual, simply follow these rules:
* For the left-hand-side entry only, end the entry with a forward-slash if there is no other path. So “www.company.com/” and “/” are valid entries, but you would not want to end “www.company.com/path” or “/path” with a forward-slash.
* For the right-hand-side entry, follow the same rule as the left-hand-side entry above except you should always end the right-hand-side entry in a forward-slash if the left-hand-side entry also ends in a forward-slash.
2nd question is, the irule works fine until you access a third party hyperlink within the site? Example: http://zyxcompany/What happens then?
/deb - Kirk_Bauer_1018
Altostratus
If you are using ProxyPass with no paths such as:
www.abccompany.com/ www.123company.com/
There is a bug where you see two ending slashes in the URL bar. Let me look into fixing that. But in reality it doesn't cause any problems at all. - Kirk_Bauer_1018
Altostratus
To fix the trailing-slash bug, please find this code in the iRule code:
if {$orig_uri eq $path_clientside} {
if {[substr $clientside [string length $clientside] 1] ne "/"} {
set is_https 0
if {[PROFILE::exists clientssl] == 1} {
set is_https 1
}
and replace it with this:
if {$orig_uri eq $path_clientside} {
if {[string index $path_clientside end] ne "/"} {
set is_https 0
if {[PROFILE::exists clientssl] == 1} {
set is_https 1
} - oliverb_68993
Nimbostratus
We have 2 big-ip's on version 9.3.0. I replaced the code in the iRule
strangely enough i was missing “if {[substr $clientside [string length $clientside] 1] ne "/"} {“ in my proxypass script. We use version 4.0 (customized for 9.3.0).
After replacing the code in the irule i wanted to update but this failed.
Can it be that i'm using an old version of proxypass? I couldn't find a version higher than 4.0
Perhaps you can help me out.
Kind regards,
oliver
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