Moving From root to another folder

I have a version of 7.1.4 that works perfect. As it stands right now, I need to point my domain to go to that folder instead of the root dirrectory (public_html/). Instead, I need it to go to public_html/folder, but the url still show my original domain name without the folder name. Anyone know how to do this in cPanel?

caredesign.net
Quote · 17 Dec 2014

That's how it's suppose to be. Your thinking that public_html is always the root folder. That is not correct. It would be the base folder where other sites can be placed, but does not necessarily mean it's a sites root

When you point a domain to a specific folder, it becomes the root folder of that site. It will not have a folder name after it in the url.

It does not matter if the domain is pointed at public_html or folder1/folder2 or folder1/folder2/....../folder100  Once the domain is pointed at a folder it is the sites root.

If you must have a folder as part of the url then you setup the site in a subfolder of that sites root.

Examples.

If you point a domain such as mydomain.com to public_html and put the site into public_html then the url will be mydomain.com

If you point a domain such as mydomain.com to public_html and put the site into public_html/folder1 then the url will be mydomain.com/folder1 but if you point the domain to the actual folder the site is in, such as public_html/folder1 then the url will just be mydomain.com

https://www.deanbassett.com
Quote · 17 Dec 2014

Perhaps another way to explain how a webservers directory structuture works.

Lets say you have a directory path that looks like this.

/home/me/public_html/folder1/folder2/folder3/

Now if you point the domain to the folder /home/me/public_html/ that folder now becomes a alias for the domain such as mydomain.com. The domain represents /home/me/public_html/ and is the starting point for everything in that domain.

So mydomain.com will reference anything within the starting point of /home/me/public_html/

You could also add the next folder in that path to the URL as well to get to the next folder and it's files such as mydomain.com/folder1 which is pretty much the same as /home/me/public_html/folder1

So basically once a domain has been pointed to a folder, it becomes that domains starting point. That domain and any folders that appear after that point can be referenced on the url, but you cannot get to any folders in front of that starting point.

I hope that clears things up a bit. I am not very good at explaining things like this.

https://www.deanbassett.com
Quote · 17 Dec 2014

It depends how how you want the main domain to work.  If you have http://mydomain.tld/site2, then I can still go to http://mydomain.tld and see what is located at that URL.  Personally, if you want a subsite off the main site, I would go with a sub domain as I think it looks prettier and simplifies the URL you give out.  http://site2.mydomain.tld

If you had public_html and had your domain pointing to that directory and then had nothing in that directory but site2 directory; then going to http://mydomain.tld would throw an error message that would be displayed to the user.

Well, depends on how things are set up.  You should not have the webserver serving up a directory tree; I have seen that and it is not wise.

Geeks, making the world a better place
Quote · 17 Dec 2014

got it situated. had to change the document root in the httpd.conf file. thanks all

 

Explaination: I have my domain as mydomain.com - which has a site that has a bunch of problems. So, I did a new site as mydomain.com/folder. Instead of going through the hassle of moving everything from the public_html/folder to public_html/, I was looking for a way to point my domain to mydomain.com/folder, but the url show as mydomain.com. Changing the document root to public_html/folder works like I need.

caredesign.net
Quote · 17 Dec 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.