Really new to programming and also MODX. (so please don’t be too harsh :D)
I got a working website with babel installed, two languages. (de + en)
English is the main language.
When I insert a picture or video inside of the second language pages it won’t show the image on the website.
The link of the image returns to be “www.lorem.de/de/image”
But it should be “www.lorem.de/image”
I believe the base_url context setting is used (in some setups) to differentiate between the contexts. This works ok for the page links but generates wrong paths for static files.
I’ve seen cases where people fixed this with a RewriteRule in .htaccess.
Something like this may work (if your static files are in the “assets” folder).
# redirect all requests to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|de)/assets(.*)$ assets$2 [L,QSA]
This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.