I have the following:
var options = new RewriteOptions()
.AddRedirect("home/(.*)", "/$1")
.AddRedirect("Home/(.*)", "/$1")
.AddRedirect("downloadics/(.*)", "ics/$1")
.AddRedirect("DownloadICS/(.*)", "ics/$1");
I would like to have it so that the I can just have one entry for home and one entry for download ics and have it not be case sensitive.
I tried passing (?)
to the front of the regex but it seems to blow up on that.
You can make these regular expressions case-insensitive by adding a (?i)
at the very beginning. This adds the i
flag which generally means “case insensitive”:
var options = new RewriteOptions()
.AddRedirect("(?i)home/(.*)", "/$1")
.AddRedirect("(?i)downloadics/(.*)", "ics/$1");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With