I’ve got URLs coming in that look like this:
https://some_sub_domain.whatever.com
That need to be redirected to:
https://some-sub-domain.whatever.com
I don’t know what the subdomains will be (they’re usernames).
While I need to replace underscores for the subdomain, I need to leave other underscores in-tact:
https://some_sub_domain.whatever.com/hey_there_underscore
Should redirect to:
https://some-sub-domain.whatever.com/hey_there_underscore
Here’s a way to rewrite via lua: