Home Regular Expression That Will Allow URL Redirect Of All URLs Without A String To Redirect To URL With That String
Reply: 0

Regular Expression That Will Allow URL Redirect Of All URLs Without A String To Redirect To URL With That String

user871
1#
user871 Published in June 20, 2018, 7:46 am

I have some versioned folders of site files that we are handling through IIS. What I need to do is create a URL Rewrite that will redirect traffic from all requests that don't match the most recent version, TO that most recent version. I'm having a difficult time as RegEx are not my specialty and I have been working on it for the last week.

Here's an example of what I need.

Most recent version: https://testurl.com/v4/#

Older Versions:

https://testurl.com/#

https://testurl.com/v2/#

https://testurl.com/v3/#

These urls have other routes off of the base as well (ex. https://testurl/v3/#/rout1)

I'm needing a regular expression that will say "Any requested url that is does not contain the /v4/ to REDIRECT to the https://testurl/v4/#

Can someone point me in the right direction?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.31117 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO