Forum Discussion
Basil_Parsley_1
Nimbostratus
Dec 21, 2016Append Forward Slash to base URL in browser - redirect using an irule
How could I set up a redirect as per
https://webpage.com >> https://webpage.com/
For when a user does not put the forward slash in the browser .. and the server does not perform this function.
I ...
Dec 21, 2016
Hi! I guess I should have been clearer in my answer too... 🙂
IF by slim chance some user would send a request with an empty URI your original rule would do it:
when HTTP_REQUEST {
if { [HTTP::uri] eq "" } {
HTTP::respond 302 Location "https://webpage.com/";
}
}
As for the forcing the browser to show "/" when the user accesses your site, this is purely on the client side.
- Chrome does not show it
- Edge does not show it (does not even show the protocol)
- Internet explorer shows it
But in all cases, what's sent to the server is another thing. Chrome and Edge still sends "/", they just don't show it. To change this behavior I suppose the browser settings would be a good start. 🙂
/Patrik
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