403 on /admin/login.php while homepage works

Website URL

https://sheetcraft.infinityfree.me/admin/login.php

Error Message

403 Forbidden — Server or website configuration is blocking you from viewing this page.

Other Information

The homepage at https://sheetcraft.infinityfree.me/ loads, but the admin login URL above returns this 403. I briefly enabled PHP Display Errors to investigate, but the same generic 403 appeared instead of a PHP error; Display Errors is now off. The site root .htaccess does not contain a rule blocking /admin/login.php. Could you check whether the server is blocking this path or advise what should be changed to make the admin login page accessible?

Welcome to the InfinityFree community forum! Good to have you here.

  • Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
  • Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
  • AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
  • Solving an issue is a joint effort. Try the suggestions you get and report back what happened.

Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.

The homepage loads, so your files are in the right folder. That rules out the first cause in our 403 article, and it’s the most common one. Neither “admin” nor “login” is among the blocked keywords the article lists, either.

I’d look at two things:

  • Is there a separate .htaccess file inside the admin folder itself? You checked the site root, but a .htaccess in admin also applies to that path. Does it have any deny from lines?
  • Does login.php exist at exactly htdocs/admin/login.php, with that exact lowercase spelling? File names are case-sensitive.

The article covers these causes, and the .htaccess IP rules in particular:

If the admin/.htaccess has anything in it, paste its contents here. That’s what would show whether it’s the cause.

I checked your website, but I get 403 errors on all URLs, not just the admin login.

And while there are some blocked keywords, the /admin/login.php should not match any of those rules. So my guess is that the issue is coming from your website code itself.

.htaccess rules are a common source for errors like this. If you have a .htaccess file, you could try renaming that to something else to temporarily disable the rules and see if that changes anything.

Even the homepage returns 403, so there is probably a problem with the .htaccess of the htdocs itself or something.