403 Forbidden Error

Status
Not open for further replies.

locogeek94

New Member
Messages
26
Reaction score
0
Points
0
When I log into my URL I get this 403 Forbidden - "You don't have permission to access on this server." But when I type in the index.html after the URL the website comes up.
How can this be corrected?
 

stpvoice

Community Support Rep
Community Support
Messages
5,987
Reaction score
212
Points
63
Hello,

Could you please post the contents of your .htaccess file?
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Hello,

Could you please post the contents of your .htaccess file?

You're dead on.

@locogeek94, your .htaccess has a line that is killing your website:

Code:
DirectoryIndex index.php

Along with
Code:
Options -Indexes

This means that it won't serve you any page at all if you don't have an index.php in there; you have index.html. I'd HIGHLY recommend changing the .htaccess DirectoryIndex line to this:

Code:
DirectoryIndex index.php index.html index.htm

This should cause a failover system - if there's no index.php, it'll look for index.html. If there's not one, then index.htm. If that's STILL not there, try to serve an index. If Options -Indexes, then 403 forbid.

The good news is you'll likely have an index.php, html, or htm in every folder, so this should alleviate the problem.
 

locogeek94

New Member
Messages
26
Reaction score
0
Points
0
Thanks for the response.
I did look at my .htaccess file and made the necessary correction.
Uploaded back to the server and I am back in business again.
Have a great week!
 
Status
Not open for further replies.
Top