for example the current redirect rule is for content/project/de/de, Now I want to add redirect rule for other languages like /content/project/de/es , /content/pro/de/en , /content/pro/de/ro etc.
here condition is:
- The band default short url should be (/content/project/de/de) be applied only if the first path is not starting with 2 letter, ex: /tr/,/ro/,/es/...
- When the path starts with /tr/... then append it to the /content/projectname/de only
Can anyone help me?
# RewriteRule for the default short URL when the first path is not starting with 2 letters
RewriteCond %{REQUEST_URI} !^/[a-z]{2}/ [NC]
RewriteRule ^/([^/]{2})/(.*)$ ${B_ROOT}/$1/$2.html [PT,L]
# RewriteRule for paths starting with /{lang}/ to append them to /content/project/{lang}/
RewriteRule ^/([a-z]{2})/(.*)$ /${B_LOCATION}/$1/$2 [PT,L]
Define B_SITE "/content/project"
Define B_ROOT "${B_SITE}/de/de"
Define B_LOCATION "{B_SITE}/de"