Forum Discussion
Rewrite URI removing file extension
The best way to do this is on the web servers (IIS URL Rewrite - http://www.iis.net/download/urlrewrite ).
Rule for the IIS URL Rewrite module:
<< the text editor of the forum is 'eating' the code - I have sent a message to the support guys...>>
To achieve this with an iRule (for your scenario):
1)
Check the host (domain)
2)
Check to see whether the request has a file extension. If it does and it's not aspx, leave the request alone.
3)
If the extension is aspx, consider redirecting it (301, not 302) to the same URL without the extension. Retain the querystring.
4)
If the request doesn't have a file extension, verify that it's not a request for the default page in a folder. For instance, a request for /events might well be intended to return /events/Default.aspx. It wouldn't do to rewrite it to /events.aspx.
5)
If there's no extension and it's not a request for the default page in a folder, rewrite the request so the extension .aspx is appended.
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