0

I'm working on a multilingual site.. Everything is working except Channel Images from DevDemon..

there is some infos and the structure

-root
|-index.php
|-fr
  |-index.php
  |-htaccess (fr)
|-en
  |-index.php
  |-htaccess (en)

root index is a simple 301 redirect using preg_match as

if(preg_match('/en-us/', $_SERVER['HTTP_USER_AGENT'])){
    header("Location: http://wwww.domain.com/en/");
    exit();
}
else {
    // Permanent redirection
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: http://www.domain.com/fr/");
    exit();
}

the htaccess in fr and en folders look like

Options +FollowSymlinks
  RewriteEngine On

  RewriteCond %{HTTP_HOST} ^domain.com/en$
  RewriteRule ^(.*)$ http://www.domain.com/en/$1 [R=301,L]
  RewriteCond $1 !^(css|documents|images|img|js|en|fr|themes|admin|index\.php|favicon\.ico|robots\.txt|sitemap\.php|apple-touch-icon\.png|info\.php) [NC]
  RewriteCond $1 !^(index\.php)
  RewriteRule ^(.+)$ index.php?$1 [L,QSA]

and the index.php in eache fr and en folder are standard ee index.php with fr and en global variable as.:

$assign_to_config['site_url'] = 'http://domain.com/en/'; 
    $assign_to_config['deft_lang'] = 'english'; 
    $assign_to_config['global_vars'] = array(// This array must be associative 
        "lang" => "en",
        "language" => "english" );

So far everything is fine .. but when i want to use Channel Images, i have to access domain.com/?Act=XX XX is integer And when i "Test Location" within Channel Image fieldtype.. i get this error : Request unsuccessful: error

Any ideas!?

THanks

UPDATE : I changed my method using this link : http://www.shortcuts.nl/index.php/weblog/comments/ee_multi-language_sites_revisited/

Everything is working now... I guess the problem was the 301 redirection from the root index.php..

UPDATE #2 :

I had the same problem few times on different website and i found that having a index.html on the root was the problem!!! I then modified the htaccess and Voila!!..

  • I would think all ACT urls are broken, including logout etc. Have you asked EllisLab about this? Since the ACT system is an EE function? – Parscale Nov 4 '14 at 4:57
  • Hi Ben, could you possibly summarise your resolution into an answer? You can then "Answer your own question", you'll get the rep but more impotantly it shows other users that there is an answer to your question, helps others that might have the same issue! – Blatant May 1 '15 at 11:25
0

After posting this question, i had the problem several times (under subdomain, main account etc.. .)

I found that having a index.html file at the root was the problem!.. Removed the file and Voila!! it's working now..

I maybe should have change the htaccess to redirect the .html file but i didn't need it then...

Hope it will help someone!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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