Hello friends,
This is my first topic, please let me know if any problem with my post.
Let's I started now.
My site url now as following
http://site_name.com/en/controller_name/
I want to convert it as following
http://en.site_name.com/controller_name/
Language prefix is first and attached to domain name. So can you please tell me how can I solve this problem. Following is the my .htaccess file.
---------------------------------------htaccess file-------------------------------
RewriteEngine On
RewriteBase /
# Allow these directories and files to be displayed directly:
# - index.php (DO NOT FORGET THIS!)
# - robots.txt
# - favicon.ico
# - Any file inside of the media/ directory
RewriteCond $1 ^(index.php|robots.txt|favicon.ico|media|css)
RewriteRule ^(.*)$ - [PT,L]
# Force EVERY URL to contain a language in its first segment.
# Redirect URLs without a language to the invalid xx language.
RewriteCond $2 !^([a-z]{2}(/|$)) [NC]
RewriteRule ^(index\.php/?)?(.*)$ en/$2 [R=301,L]
# Silently prepend index.php to EVERY URL.
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ index.php/$1 [L]
---------------------------------------htaccess file-------------------------------
Thanking you,
thebestmind.