Subdomain using .htaccess problem ?

by YongC
5 replies
  • WEB DESIGN
  • |
Hi i'm trying use htaccess to point any sub domain follow this rule
Ex : http://ex.mydomain.com to http://mydomain.com/index.php?module=ex

Here is my htaccess code :


RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.mydomain.com
RewriteCond %{HTTP_HOST} ([^.]+)\.mydomain.com
RewriteRule ^(.*)$ /index.php?module=%1


It's work other my hosting but when i using on godaddy hosting, it's not work ?

Anyone can help me, Thanks so much !
#htaccess #problem #subdomain

Trending Topics