Forum Discussion
URL Redirect never works first time
i have a simple irule that redirects users to a longer URL that we do not want them to have to remember.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" {
HTTP::redirect "https://[HTTP::host]/psp/HRDEV91/?cmd=login&languageCd=ENG"
}
}
}
This irule NEVER works the first time a PC goes to https://website/ you get a page cannot be displayed. If you type it in again it redirect just like it should and all subsequent attempts to go to the root URL redirect you to the appropriate site. This happens from every PC i try it on. Any ideas what the problem could be?
4 Replies
- hoolio
Cirrostratus
Hi Brent,
Do you have any other iRules enabled on the virtual server? Or any modules like WAM or ASM?
Do you see any errors in /var/log/ltm when you reproduce the issue?
Which LTM version are you running? Assuming 10.x+, can you run 'tmsh list ltm virtual VS_NAME' and post an anonymized copy of the virtual server config?
Aaron - brent112_11716
Nimbostratus
No other irules, we have ASM but it is not enabled on this virtual server. We are running version 11.2
i ran that command and the virtual server that i created does not show there, could it be because i used an iapp to create it?
- hoolio
Cirrostratus
If it's part of the iApp, it would be in a folder:
tmsh
cd FOLDER_NAME
list ltm virtual VS_NAME
Aaron - Brian_Van_Stone
Nimbostratus
Is there a difference between the "first time" being "http://www.example.com" or "http://www.example.com/"
Presence, or lack thereof, of a trailing slash messing things up for you?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
