I want to setup a multi language site for my web app. But I'm rather confuse on where to start. I'm using Codeigniter and hosted my domain in a cpanel server.
What I want to have is multi language with subdomains such as:
en.abc.com for english
id.abc.com for indonesia
So far, I have set up the advanced DNZ Zone editor and point the subdomains to the server IP address. But, I don't know what to do next. I have read on some tutorial to set the .htaccess, etc. But it doesn't work.
This is my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^(/index\.php|/assets|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)\.html$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^(/index\.php|/assets|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{HTTP_HOST} ^en\.lokadok\.co.id$
RewriteCond %{REQUEST_URI} !^/en/
RewriteRule (.*) /en/$1
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
I got the 404 not found error everytime I access the subdomains which redirected to address like:
http://www.en.abc.com/en/index.php/en/
My question is, from where should I start implement it?
Thanks.