Redirect to subfolder if not already

Hello,
I have a domain that work under a language path
https://www/mydomain.com/el/

I want all requests to https://www.mydomain.com/something.html to go to
https://www.mydomain.com/el/something.html
but ignoring request already on the /el/ subfolder for example for this request
https://www.mydomain.com/el/something2.html I want nothing to happen and leave it as is.

Thank you.
Christoforos

You can probably achieve this with the following two rules

The first one is just a dummy rule to catch /el requests and not enter a redirection loop. The second rule should actually redirect all other resources to el.

One thing, I made a typo in the second rule. It should be $2 and not $1.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.