0

I got one question. I have setted up a multilanguage site and all is working great. Expect one thing (maybe its not possible):

I got working links for the content like:

http://www.domain.de/en/link

But for Files its not working´, is it possible to have file urls's with prefixes:

http://www.domain.de/en/image.png 

(where the image is located of course in /images - without prefix)

Is that possible?

THX for any info!

2 Answers 2

0

With Apache2 server, you may add this rule

RewriteRule ^[a-z]{2}/((.*).(png|jpg|gif))$  /images/$1 [NC]

You may fiddle around with rewrite rule sets here: http://martinmelin.se/rewrite-rule-tester

1
  • THX, that pointed me to the right direction. I had to change the Flags to [L,QSA] to make your rule to work, oh and it did not work with subfolders. I got it to work with subfolders and specified the correct language prefixes, cos your range expect any combination :). Finally i got this, wich is working like a charm: RewriteRule ^(?:en|de)/images/(.*)$ /images/$1 [L,QSA]
    – user5421
    Commented Apr 5, 2016 at 19:20
0

Pretty sure you would have to put the files in individual language directories separately as far as I know.

IE) For english

http://domain.com/en/images.PNG

For French

http://domain.com/fr/images.PNG

You can do this via FTP on your server. Im sure there would many different approaches to solving this too.

1
  • Thx for your answer. I asked because of i dont want two different folders. I know about the routing system of joomla and that it dosent match physical files. I am thinking about some htacces trick, dont know if its possible. Like: match any request for /en/images/ or /fr/images/ and serve the content from /images/.
    – user5421
    Commented Apr 1, 2016 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.