Forum Discussion
Austin_Geraci_1
Nimbostratus
Mar 13, 2007Redirect Problem
I just want to do a basic redirection;
www.mydomain.com
www.mydomain.com/directory1/directory2
When I use the syntax below I get;
www.mydomain.com/www.mydomain.com/directory1/directory2
How Can I get rid of that initial uri??
Thanks!
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } {
HTTP::redirect "www.mydomain.com/directory1/directory2/"
}
}
- hoolio
Cirrostratus
If you don't include the protocol in the redirect the browser assumes appends the new redirect value to the URI is just requested. If you add http:// or https:// to the redirect it should work fine:when HTTP_REQUEST { if { [HTTP::uri] eq "/" } { HTTP::redirect "http://www.mydomain.com/directory1/directory2/" } }
- Austin_Geraci_1
Nimbostratus
Great, I actually found some doc on this last night, i appreciate your quick response! - hoolio
Cirrostratus
That's good to hear.
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