Jump to content
[MUST READ] Forum Rules ×

Changing Root Directory


MSdev

Recommended Posts

Hello,

I am new to hyperphp and when I opened the file manager there was a file 'htdocs' where I put my website code.

In there, the main call from hyperphp hosting is to look in 'htdocs' for an index.html/php file.

My situation Is in my website documents I have it layed out like this... all my documents and folders are first, then I have a public folder and in there I have index.php that references to other files in my project.

How can I change the root directory to go into my public folder?

Link to comment
Share on other sites

Hi,

Unfortunately you are unable to change the directory for your public website files, iFastNet(or byet) restricted it. 

I also don't think you need to change the directory. Place the content in the htdocs folder and it should be good to go.

The htdocs folder can only be viewed by you(and people that has FTP access).

Normal people visiting your website will have no clue where did you put your files in your web hosting service.

Link to comment
Share on other sites

23 hours ago, MSdev said:

In there, the main call from hyperphp hosting is to look in 'htdocs' for an index.html/php file.

You don’t need to tell your code to look in the htdocs folder, because you code has no clue that that folder even exists, let alone what it’s called. 
 

You cannot save files for your website outside the htdocs folder, so there is no reason to change its name/location. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...