currently, in web root i have this in .htaccess:
- Code: Select all
RewriteEngine On
RewriteBase /path/to/site/
RewriteCond %{REQUEST_URI} !^(sr|en)(/|$) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?(.*)$ sr/$1 [L,QSA,R=301]
and i have sr and en subfolders (languages) in both those directories i have following .htaccess (with appropriate RewriteBase):
- Code: Select all
RewriteEngine On
RewriteBase /path/to/site/sr/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.php [L]
end when i go to:
http://example.com/path/to/site/
it will redirect me to:
http://example.com/path/to/site/sr/
(which is what i want)
but, when i go to:
http://example.com/path/to/site
(without slash at end) it redirects me to:
http://example.com/path/to/site/sr/absolute/file/system/path/to/web/root
thanks in advance!