CodeIgniter Forums
mod rewrite subdomain url - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: mod rewrite subdomain url (/thread-43070.html)

mod rewrite subdomain url - El Forum - 06-29-2011

Hello guys!

I just try to work a site now.. which I want the countries as subdomain. I already set up the DNS and Server Alias on the server.

Just to see if I got it write.

1. When I type is same as Is this correct?

2. I want
to be as

Here is the htaccess that I put into it:

RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.mydomain\.com$ [NC]
RewriteRule ^(.*)$$1 [R=301, L]

Though after typing the it redirects me to but I want the subdomain shows up only.

Did I miss anything in this?