Forum Discussion
ERLomboy_27803
Feb 08, 2014Nimbostratus
iRule rewrite | URL hiding
Hi Guys,
Have a requirement and I'll try to provide as much details as possible to help understand.
Internet users views web page, and posts web form to: htps://www.mysite.com/help/site1/...
nitass
Feb 11, 2014Employee
The log shows it's not capturing the right uri.
i still expect to see www.mysite.com as host and uri starts with /help/site1/ in the log. if you do not see it, i think you may need to check if host and uri information you have is correct indeed.
- ERLomboy_27803Feb 11, 2014NimbostratusThis is the other iRule. Can you find out which one is conflicting with what you have provided? when HTTP_REQUEST { if { [string tolower [HTTP::uri]] ne "/powermoves" } { switch -exact [string tolower [HTTP::host]] { "www.mysite.com" { if {[TCP::local_port] == 80} { HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]" } elseif { [string tolower [HTTP::uri]] starts_with "/forumsdotnetnuke/" } { if { [string tolower [HTTP::host]] ne "forums.mysite.com" } { HTTP::respond 301 Location "https://forums.mysite.com[HTTP::uri]" } } elseif {[string tolower [HTTP::uri]] starts_with "/summergames/" || [string tolower [HTTP::uri]] starts_with "/summergames"} { HTTP::respond 301 Location "http://summergames.mysite.com" } } "mysite.com" { if { [matchclass $::wwwredirects equals [string tolower [HTTP::path]]] } { HTTP::respond 301 Location "https://www.mysite.com[HTTP::uri]" } elseif { [TCP::local_port] == 80 } { HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]" } elseif { [string tolower [HTTP::uri]] starts_with "/ciqdotnet/excel/114/" || [string tolower [HTTP::uri]] starts_with "/ciqdotnet/excel/102/" } { HTTP::respond 301 Location "https://www.mysite.com[HTTP::uri]" } elseif { [string tolower [HTTP::uri]] starts_with "/forumsdotnetnuke/" } { if { [string tolower [HTTP::host]] ne "forums.mysite.com" } { HTTP::respond 301 Location "https://forums.mysite.com[HTTP::uri]" } } elseif {[string tolower [HTTP::uri]] starts_with "/summergames/" || [string tolower [HTTP::uri]] starts_with "/summergames"} { HTTP::respond 301 Location "http://summergames.mysite.com" } } default { if { [TCP::local_port] == 80 } { HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]" } elseif { [string tolower [HTTP::uri]] starts_with "/forumsdotnetnuke/" } { if { [string tolower [HTTP::host]] ne "forums.mysite.com" } { HTTP::respond 301 Location "https://forums.mysite.com[HTTP::uri]" } } } } } else { HTTP::redirect http://powermoves.mysite.com } }
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