drisate Posted March 3, 2009 Share Posted March 3, 2009 Hey guys i need to create a virtual subdomain for a referal systeme domain.comindex.php?user=Joe123 Should be accessible by going at Joe123.domain.com How do i set my htacess for that? Link to comment https://forums.phpfreaks.com/topic/147689-solved-create-subdomain/ Share on other sites More sharing options...
drisate Posted March 3, 2009 Author Share Posted March 3, 2009 Found it thx RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mydomain.com RewriteCond %{HTTP_HOST} ([^.]+)\.mydomain.com RewriteRule ^(.*)$ /profile.php?mid=%1 Link to comment https://forums.phpfreaks.com/topic/147689-solved-create-subdomain/#findComment-775223 Share on other sites More sharing options...
drisate Posted March 3, 2009 Author Share Posted March 3, 2009 nope ... not working ... RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.beta.***.org RewriteCond %{HTTP_HOST} ([^.]+)\.beta.***.org RewriteRule ^(.*)$ /index.php?option=com_comprofiler&task=userProfile&Itemid=0&user=%1 I get a 404 not fount error The code should redirect 1.beta.***.com to the users profile Link to comment https://forums.phpfreaks.com/topic/147689-solved-create-subdomain/#findComment-775233 Share on other sites More sharing options...
drisate Posted March 3, 2009 Author Share Posted March 3, 2009 By the way i do have the dns wild card set up and the .htacess is at the beginning of the domain. Link to comment https://forums.phpfreaks.com/topic/147689-solved-create-subdomain/#findComment-775248 Share on other sites More sharing options...
dezkit Posted March 3, 2009 Share Posted March 3, 2009 Wait, what is the problem? Link to comment https://forums.phpfreaks.com/topic/147689-solved-create-subdomain/#findComment-775261 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.