Hello,
the multi-language alternative, where a sub-directory is used for each language seems to break my member log-in, that is, if I’m not missing something.
The starting point
I have two language directories, say en/ and de/ each with their respective index.php and .htaccess files. The htaccess files also eliminates the index.php in the uri’s. The multi-language set-up itself works like a treat, with a language switch and a small custom plug-in visitors can switch languages at any point and also third party add-on navee was a nice fit for fulfilling the multi-language requirement. So far so good.
The problem
Now when I implement a log-in form it only seems to actually work from within root directory. When I’m trying to log in from /en or de/ I’m not authenticated and i’m redirected to http://mydomain.com/mydomain.com/de .
Does anybody have an idea where where my problem could be?
Thanks,
Daniel
Reference index and .htaccess alterations as used
E.g. the /en/index.php got the following two lines added:
$assign_to_config['global_vars']['language'] = "en";
$assign_to_config['site_url'] = getenv('HTTP_HOST') . "/en";and the system reference to the system path was altered
$system_path = '../system';and the /en/.htaccess looks as follows:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
# Enforce NO www
RewriteCond %{HTTP_HOST} ^www [NC]
RewriteRule ^(.*)$ <a href="http://domain.tld/en/$1">http://domain.tld/en/$1</a> [L,R=301]
# Removes index.php
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /en/index.php/$1 [L]
# If 404s, "No Input File" or every URL returns the same thing
# make it /index.php?/$1 above (add the question mark)
</IfModule>