diabloverde Posted December 5, 2008 Share Posted December 5, 2008 I have a Godaddy Shared hosting account using Linux / Apache server 1.3. I have created the following directory structure for a subdomain: /Primary Domain Document Root/Subdomain/Public_html/index.php /Primary Domain Document Root/Subdomain/Public_html/php.ini /Primary Domain Document Root/Subdomain/Public_html/css/ /Primary Domain Document Root/Subdomain/Public_html/javascript/ /Primary Domain Document Root/Subdomain/PHP_INCLUDES (to protect includes from showing unparsed in the event of a freak accident) /Primary Domain Document Root/Subdomain/.htaccess when I type in http://www.Subdomain.com it directs to the /Primary Domain Document Root/Subdomain/ directory. I don't have access to the Root configuration file since it is shared hosting. I can only modify .htaccess and php.ini. Can someone tell me how to get the the http://www.Subdomain.com request to redirect to the /Primary Domain Document Root/Subdomain/Public_html/ directory using .htaccess and/or php.ini? I tried using DocumentRoot=".:/Primary Domain Document Root/Subdomain/Public_html" in the .htacess file of the Subdomain directory before I read that it can only be done the root configuration file. If you can help, I will make an offering to the PHP Gods on your behalf (by proxy). And yes I am a noob, though I'd like to think an intermediate one. Quote Link to comment Share on other sites More sharing options...
corbin Posted December 6, 2008 Share Posted December 6, 2008 You can't change a doc root with htaccess or php.ini. It has to be in httpd.conf. You could get some ghetto .htaccess ModRewrite magic going, but I would use that as a last resort. Quote Link to comment Share on other sites More sharing options...
diabloverde Posted December 6, 2008 Author Share Posted December 6, 2008 Thanks for the confirmation on not being able to modify php.ini and .htaccess in that way. Hopefully they will let me modify httpd.conf. Quote Link to comment Share on other sites More sharing options...
corbin Posted December 6, 2008 Share Posted December 6, 2008 ;p Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.