slawsonb Posted October 16, 2004 Posted October 16, 2004 How do I change the web root from public_html to somthing like public_html/mywebroot? Thanks, Bruce Quote
TCH-Andy Posted October 16, 2004 Posted October 16, 2004 Hi Bruce, Welcome to the Family I'm not sure I fully understand teh question. You can not change the root structure - but you can put all the files into a directory (or subdomain) if you want to. then they would be in /home/username/public_html/mywebroot Quote
TCH-Bruce Posted October 16, 2004 Posted October 16, 2004 Welcome tot he family, Bruce! Man that sounds weird! Sounds like I am talking to myself! Quote
TCH-Don Posted October 16, 2004 Posted October 16, 2004 Welcome to the Family Bruce and your new home! if you mean that you have installed a script like phpnuke in a folder and want anyone redirected to that folder automatically, you can do that in cpanel just put any index.html file in the public_html folder Then in cpanel > redirect put index.html in the first window and in the second window put domain.ext/folder/index.php then you will see that requests for domain.ext/index.html wil be redirected to domain.ext/folder/index.php if this is not what you need, please ask, and we will try to help. We really are like family here. So if you need anything, just ask your new family! We love to help Quote
slawsonb Posted October 16, 2004 Author Posted October 16, 2004 Thanks for your quick responces. To clarify. I want to be able to change the directory location for the root context of my domain. An example: If I browse to http://****/ I am served pages from somewhere like /.../mydomain/public_html/mywebroot The Apache directive to do this for my virtual host would then be: DocumentRoot "/.../mydomain/public_html/mywebroot" Some of the reasons for doing this are: - Allow for website redesign without having to move every file to a new location. - Allow testing of an application in a subdirectory first. When test is complete, Change the DocumentRoot to the subdirectory. - Helps keep the public_html from being cluttered with many files. For example if I want my osCommerce catalog in the document root I will have a multitude of files in public_html. I would rather they be in a subdirectory called oscommerce. Thanks, Bruce Quote
TCH-Dick Posted October 16, 2004 Posted October 16, 2004 You add the following to htaccess >DirectoryIndex subdomain/index.html Quote
TCH-Don Posted October 16, 2004 Posted October 16, 2004 I see what you are saying, and TCH-Dick has the perfect answer (leave it to me to to take the long way ) if you need anything else, please ask Quote
jandafields Posted October 16, 2004 Posted October 16, 2004 You add the following to htaccess >DirectoryIndex subdomain/index.html Wow, that looks a very handy piece of info to have! Thanks TCH-Dick!!! Quote
TCH-Don Posted October 16, 2004 Posted October 16, 2004 Keep in mind that image paths may not always be right if they are in another folder and the links are relative. Quote
slawsonb Posted October 21, 2004 Author Posted October 21, 2004 Thanks guys. I will try and get by with DirectoryIndex if I can't set DocumntRoot. Bruce Quote
borfast Posted October 21, 2004 Posted October 21, 2004 Welcome aboard, Bruce And do let us know how that works out, I didn't know that nice trick Dick suggested. Very cool, thanks Dick! Thumbs Up Quote
TCH-Thomas Posted October 21, 2004 Posted October 21, 2004 Welcome to your new extended and somehow crazy family Quote
TCH-Rob Posted October 21, 2004 Posted October 21, 2004 Bruce, Welcome home and thanks for making our TCH-Bruce happy. He doesnt have many friends so it is good to see him excited. Once again, happy to have you aboard. Thumbs Up Quote
TCH-Bruce Posted October 21, 2004 Posted October 21, 2004 Welcome home and thanks for making our TCH-Bruce happy. He doesnt have many friends so it is good to see him excited. You are so funny Rob! Quote
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.