• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mod rewrite subdomain url

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 us.mydomain.com is same as mydomain.com 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 ^(.*)$ https://www.mydomain.com/countries/$1 [R=301, L]

Though after typing the us.mydomain.com/ it redirects me to https://www.mydomain.com/countries/ but I want the subdomain shows up only.

Did I miss anything in this?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.