Regex to redirect if URL does not contain en|admin|umbraco
Hi folks. I'm hoping for a little regex help here. Until the site will be adding more locales, I'd like to redirect requests the don't match ~/en or ~/admin or ~/|umbraco to the ~/en directory. The negative look-ahead approach isn't working for me. Perhaps my syntax is incorrect?
I know that Regex fundamentally is a toolset to find matches (patterns) strings and not act upon grouped character mismatches, but I thought I'd just throw this out there and see if anyone has any "production-worthy" ideas.
Thanks you guys! I rethought how to approach the issue and wrote a regex to solve my woes! I have to find how to manage my IIS from Visual Studio since that is how I'm managing my local Umbraco installation, and the Expresso app looks dope! Thanks again :-)
Regex to redirect if URL does not contain en|admin|umbraco
Hi folks. I'm hoping for a little regex help here. Until the site will be adding more locales, I'd like to redirect requests the don't match ~/en or ~/admin or ~/|umbraco to the ~/en directory. The negative look-ahead approach isn't working for me. Perhaps my syntax is incorrect?
I know that Regex fundamentally is a toolset to find matches (patterns) strings and not act upon grouped character mismatches, but I thought I'd just throw this out there and see if anyone has any "production-worthy" ideas.
Any suggestions?
IIS (Internet Information Service) actually have a really good tool to test your URL-rewrites.
Open IIS > Click on any "site" > URL Rewrite > And add a new Inbound rule.
If you can't find the URL Rewrite module make sure it's installed. https://www.iis.net/downloads/microsoft/url-rewrite
also.. http://www.ultrapico.com/expresso.htm
Thanks you guys! I rethought how to approach the issue and wrote a regex to solve my woes! I have to find how to manage my IIS from Visual Studio since that is how I'm managing my local Umbraco installation, and the Expresso app looks dope! Thanks again :-)
is working on a reply...