i'm struggling with the url rewriting. I have a template called tournament.cshtml. Many links to our site are pointing to the domainname.nl/tournament/
because there is no tournament with this link I've written en url rewrite rule as follows:
Well the first rule is processed first, so I think if you just switch them around it should work.
But to make your example simpler you could just add a ? after the slash which in regex means: match between 0 and 1 of the preceding token. Exactly what you want: match if there is 0 or 1 slash. And then you only need one rule:
can you explain (or give me a hint how to troubleshoot) why it is working in Chome, but I get an error when opening the same site in IE with a trailing slash (without it is working in IE). site: http://www.batswingers.nl/toernooi/
Error:
This page can’t be displayed
•Make sure the web address http://www.batswingers.nl is correct.
•Look for the page with your search engine.
•Refresh the page in a few minutes.
Fix connection problems
Url rewriting trailing slash fail
Hi all,
i'm struggling with the url rewriting. I have a template called tournament.cshtml. Many links to our site are pointing to the domainname.nl/tournament/
because there is no tournament with this link I've written en url rewrite rule as follows:
this is working for http://www.domainname.nl/tournament but will give a 404 when adding a trailing slash like: http://www.domainname.nl/tournament/
because I don't rely on my regex skills adding a second rule like the following doesn't help.
What am I doing wrong?
Well the first rule is processed first, so I think if you just switch them around it should work.
But to make your example simpler you could just add a
?
after the slash which in regex means: match between 0 and 1 of the preceding token. Exactly what you want: match if there is 0 or 1 slash. And then you only need one rule:Sebastiaan,
can you explain (or give me a hint how to troubleshoot) why it is working in Chome, but I get an error when opening the same site in IE with a trailing slash (without it is working in IE). site: http://www.batswingers.nl/toernooi/
Error:
I don't know about that one.. sounds like a browser issue, it works fine in IE11 on my machine with and without slash..
is working on a reply...