[SOLVED] How to read a html file from new folder

edited January 14 in General Discussion
Salam. Dear Admin

I'm new to cyberpanel and also not very familiar with forum, so please forgive me if this question is not appropriate or didnt follow this forum rules.

My question is, how to enable loading a html file from new folder inside home/mydomain folder

For example, i created a folder name pages inside /home/mydomain/
and inside the folder 'pages' is a html file named myfile.html

So normally the url should be : http://mydomain/pages/myfile.html

For now i couldnt figure out why it always show 404 page not available.

But if i upload the file(myfile.html) to the public_html folder, it has no problem loading.

Is there any way to solve this?

Tq

Comments

  • I can not reproduce this issue on my end. I've used both Filemanager or SSH to create a directory under public_html and was able to read the HTML files inside it.

    Make sure the files you are creating having appropriate rights, so that server process can read those files or create them directly from Filemanager (so that they have correct rights/permissions)

    Apart from that there may be some rewrite rules creating the issue, do you have .htaccess files in any of these folders, and what are their contents?
  • I can not reproduce this issue on my end. I've used both Filemanager or SSH to create a directory under public_html and was able to read the HTML files inside it.

    Make sure the files you are creating having appropriate rights, so that server process can read those files or create them directly from Filemanager (so that they have correct rights/permissions)

    Apart from that there may be some rewrite rules creating the issue, do you have .htaccess files in any of these folders, and what are their contents?

    many thanks and as of your suggestion, i'll check .htaccess first and get back here a.s.ap
  • ok issue resolved.

    i made a mistake by adding redirect from old yoast plugin .htaccess redirect file.

    Once i deleted them it turned normal as you mentioned.

    Thanks and jazaakallahu khair!
Sign In or Register to comment.
Support CyberPanel CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!