Hi guys,
I'm struggling with probably quite simple mod_rewrite taks.
This is the directory structure I have:
- root\
- translations\
- en\ (contains various subfolders with files, 2 levels deep)
- fr\ (contains various subfolders with files, 2 levels deep)
- translations\
what I want to do is to point various dynamically created URLS to those specific locations without changing the URL in the address bar.
For example:
mydomain.com/one/
mydomain.com/two/
mydomain.com/three/
-> all would read content from /root/translations/en/index.php
mydomain.com/one/sub1/sub2/
mydomain.com/two/sub1/sub2/
mydomain.com/three/sub1/sub2/
-> would read content from /root/translations/en/sub1/sub2/index.php
mydomain.com/onefr/
mydomain.com/twofr/
mydomain.com/threefr/
-> all would read content from /root/translations/fr/index.php
mydomain.com/onefr/sub1/sub2/
mydomain.com/twofr/sub1/sub2/
mydomain.com/threefr/sub1/sub2/
-> would read content from /root/translations/fr/sub1/sub2/index.php
I tried something like:
RewriteCond %{REQUEST_URI} !\.css$ [NC]
RewriteRule ^/(one|two|three)/$ /_translations/en/ [L]
RewriteCond %{REQUEST_URI} !\.css$ [NC]
RewriteRule ^/(onefr|twofr|threefr)/$ /_translations/fr/ [L]
and while it works for the default redirect (e.g. mydomain.com/one/) the moment I want to go deeper it throws 404.
Any clues?