RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.eyesharp.co.cc RewriteCond %{HTTP_HOST} ([^.]+)\.eyesharp.co.cc RewriteRule ^(.*)$ index.php?name=%1