Beginner Questions In General

Hey Guys!

Sorry this post is so long. I sincerely thank you for your time.

Though I’m a very experienced coder (though a junior in college), I’m new to web hosting and am kind of confused by some things.

For one, how do I determine which file the client sees when they first enter the page? Do I have to call it index (for example, index.php)? Because I have an index.php file but it doesn’t always go there immediately when you go to the site.

Also, all of my files (including index.php) are having the following message pop up in place of their actual content: 404. That’s an error.The requested URL was not found on this server. I read that this was due to incorrect filenames (as they are case sensitive and all), but I don’t think this is the case with my site because I literally copied and pasted the file paths and the error still comes up.

I actually started getting the 404 error after I changed the main file name to public_html, as opposed to what I had originally. Before that, I got an error saying I didn’t have permission to access the site. So another question I have is: do you have to use public_html as the file name to make it accessible to the client, or is there a way to change permissions?

Here’s my site by the way: http://studyappbeta.000webhostapp.com

Again, thanks in advance for your response.

Hello @Alioune01!

Thank you for being part of 000webhost! Regarding your question about file names, yes, you’ll want to call you main page something like index.html or index.php, depending on the code language you are using. You’ll want to use .html for HTML files and .php for PHP files. It seems you’ve got that working, as when I visit your site, it goes directly to your homepage.

Regarding the 404 error, can you provide us with a link to a page that shows this? This will help us diagnose the issue.

Regarding your last question, the main folder is labeled public_html. You need to keep the name, otherwise your site won’t function properly. You want to keep all your files in this one folder so they’re accessible by your users.

I hope I explained myself enough! :smile:

Austin

It wouldn’t let me post a link to that host for some reason.

If you just try to create an account and then login it will fail to go to the home page. I’m not sure what’s wrong with it.

I went through your website and fixed the files. You were redirecting pages to files in a public_html folder, however, that’s not needed. Everything works fine now! :smile:

Thanks, it works now! By the way, I was notified that the community thought I was a spammer :smile: Why is that?

No problem! Our system automatically marks some posts as spam, so that’s probably what happened here. :slight_smile: