Voldemort Posted May 3, 2007 Share Posted May 3, 2007 I've been trying to create dynamic subdomains with htaccess but I've had no luck. I'm trying to make http://whatever.mysite.com redirect to http://www.mysite.com/index.php?name=whatever... RewriteEngine On RewriteCond %{HTTP_HOST} ^([^\.]+)\.mysite\.com$ [NC] RewriteCond %1 !^(www|ftp|mail)$ [NC] RewriteRule ^.*$ http://www.mysite.com/index.php?name=%1 [R,L] Link to comment https://forums.phpfreaks.com/topic/49761-dynamic-subdomains/ Share on other sites More sharing options...
corbin Posted May 3, 2007 Share Posted May 3, 2007 Do you have wildcard subdomains enabled? If you don't then that could be [part of] the problem.... As for your rewrite... hmmm... I think it's ok, but I'm terrible at that stuff... If you ping randomsubdomain.yoursite.com does it know which IP to ping? Link to comment https://forums.phpfreaks.com/topic/49761-dynamic-subdomains/#findComment-244745 Share on other sites More sharing options...
Voldemort Posted May 4, 2007 Author Share Posted May 4, 2007 Last night my hosting company said they enabled it, but It doesn't seem like it is... Everything I read says I should get a "page not found" error, but I'm still getting a "site doesn't exist" error. I've sent another request, but that was two minutes ago, so I won't know for a while. Link to comment https://forums.phpfreaks.com/topic/49761-dynamic-subdomains/#findComment-244907 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.