Obviously a pretty simple question: how do I rewrite
(value1).example.com/(value2)
to
/(value1)/(value2)
I've tried a couple of things without success.
Thank you in advance.
Obviously a pretty simple question: how do I rewrite
(value1).example.com/(value2)
to
/(value1)/(value2)
I've tried a couple of things without success.
Thank you in advance.
Try this rule:
Some explanation: My previous suggestion caused an infinite recursion as the L flag causes a restart of the rewriting process with the new URL:
The second condition will avoid this as it compares the subdomain part with the first path segment. And only if they are different the condition is true and the rewrite takes place.