chrischen Posted November 6, 2008 Share Posted November 6, 2008 I found this code: RewriteCond %{HTTP_HOST} !www.polemicpost.com$ [NC] RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).polemicpost.com [NC] RewriteRule (.*) %2/$1 [L] However it doesn't work for me. I'm trying to have it so that graphics.polemicpost.com refers to www.polemicpost.com/graphics, which is a folder. so graphics.polemicpost.com/photo1.jpg is www.polemicpost.com/graphics/photo1.jpg. Thanks, Chris Link to comment https://forums.phpfreaks.com/topic/131578-virtual-subdomain/ Share on other sites More sharing options...
corbin Posted November 6, 2008 Share Posted November 6, 2008 You will need to set up subdomains with your DNS stuff.... Possibly a wildcard subdomain. Link to comment https://forums.phpfreaks.com/topic/131578-virtual-subdomain/#findComment-683437 Share on other sites More sharing options...
chrischen Posted November 6, 2008 Author Share Posted November 6, 2008 that's been done. And done in apache virtual hosts config file too. Link to comment https://forums.phpfreaks.com/topic/131578-virtual-subdomain/#findComment-683469 Share on other sites More sharing options...
peranha Posted November 6, 2008 Share Posted November 6, 2008 Are you running windows or linux? In windows there is also a hosts file you need to edit. http://en.wikipedia.org/wiki/Hosts_file Link to comment https://forums.phpfreaks.com/topic/131578-virtual-subdomain/#findComment-683474 Share on other sites More sharing options...
chrischen Posted November 6, 2008 Author Share Posted November 6, 2008 Windows and apache. I'll try that and let you know if it works. Thanks. Link to comment https://forums.phpfreaks.com/topic/131578-virtual-subdomain/#findComment-683484 Share on other sites More sharing options...
chrischen Posted November 7, 2008 Author Share Posted November 7, 2008 I added 127.0.0.1 graphics.polemicpost.com to the hosts file and rebooted the computer. Still gives me Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Link to comment https://forums.phpfreaks.com/topic/131578-virtual-subdomain/#findComment-684298 Share on other sites More sharing options...
corbin Posted November 7, 2008 Share Posted November 7, 2008 Check your error log and see what it says about the error. Also, editing your hosts file does nothing from the outside. If someone else's computer doesn't have the hosts entry, the host won't resolve. Link to comment https://forums.phpfreaks.com/topic/131578-virtual-subdomain/#findComment-684324 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.