1

I have multilangual website with two languages. When I open article editor I try to insert to an article a link to some file for example to REC.zip that is in the root folder of my website

At the front-end I see that the link has url like mydomain.com/REC.zip so that's ok. But when I click the link, Joomla redirects me to the mydomain.com/en/REC.zip url so I get the 404 error

If I add to the .htaccess file the line

Redirect 301 http://mydomain.com/en/REC.zip http://mydomain.com/REC.zip

I get the 404 error again or get the endless looping error

How to fix it?

Joomla 3.5.1

1 Answer 1

2

You have this error because the default language in your site is "en", the language
is managed by joomla!, not by directories, we have some solutions:

First of all, maybe the best way is create a new folder for your files in the default
multimedia folder, in your_site.com/images:

images
- files
-- en
-- de

Add the link in your content like:

<a href="http://your_site.com/images/files/en/file.zip" target="_blank">Download</a>

or

<a href="images/files/en/file.zip" target="_blank">Download</a>

In modern browser you have this option:

<a href="images/files/en/file.zip" download="File Name">Download</a>

But, we have a problem with the above solution, if you want to restrict the access
to the download file, other users can download the file withouth restriction if they
have the full url.

Maybe the best solution is use some extension that makes use of MVC and allow
restrictions, you can try with OSDownloads or JDownloads.

Regards.

1
  • Thanks! I see that I can create any folder in the root directory of my website, not only inside of the images folder. And it still works
    – stckvrw
    Commented Apr 9, 2016 at 19:35

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.