RewriteEngine On RewriteCond %{HTTP_HOST} !^(www\.)?titancontent.com$ [NC] RewriteCond %{HTTP_HOST} ^([^.]+)\.titancontent.com$ [NC] RewriteCond %{REQUEST_URI} !index.php RewriteRule ^ /index.php?url=%1 [L]