Jump to content

Dynamic subdomains?


Voldemort

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.