Hi All, Apologies if this has been asked before, but I had no luck finding the same question, so here goes. I have a wiki server (well, VM really) and currently within my /var/www directory I have a few sub-directories E.G. /a, /b & /c . These are all different wiki implementations, and so are quite distinct from one another. We've chosen which wiki we want to go with, and I've set it up so entering the url (E.G. http://www.domain.com) will take you to the wiki we've chosen (I.E http://www.domain.com/b/index.php ). So, with the background out of the way, onto my question. It's been decided that the "b" is not desirable in the url anymore and so people would like the url to simply be http://www.domain.com/index.php (I.E lose the "/b"). While I could just move the /b/ structure into /www/ , i'd prefer to be able to keep the filesystem folder structure the way it is in order to facilitate future development work. Anyway, I've tried a few different ways of doing this, but am not having much luck! So, any advice anyone could give me on what to put in my (preferably) httpd.conf file would be greatly appreciated! Thank you!
Try searching for the line that looks like this in your httpd.conf: DocumentRoot /some/folder/var/www/ Code (markup): If your site it pointed to the main server /var/www/ then just loose that folders in front of it. If it's some virtual site then you would probably need to state some more complex path there. Anyway... just find the proper DocumentRoot variable and from /var/www/ change it to /var/www/b/ and that's it. If you have more then 1 site on your server, then you will have more then 1 DocumentRoot variable, so be careful which one you are changing. I strongly recommend that you backup your httpd.conf first, before changing anything. Always make a backup before editing!
Thanks mate, that put me on the right path. I had been trying DocumentRoot in my global httpd.conf file, but what you said about multiple DocumentRoot declarations made me think about the "sites-enabled" directory and the declarations made in the virtual host files, and yeah after changing the appropriate DocumentRoot, it worked like a charm! Thanks again, big relief to finally nail that one!