Forbidden. You don't have permission to access this resource.

Status
Not open for further replies.

carlart2

Member
Messages
31
Reaction score
0
Points
6
Ever since x10hosting did the migration, I have received this message when attempting to access my free x10host site:

Forbidden

You don't have permission to access this resource.


What is this problem and what is the source of it? What is the solution?
 

Anna

I am just me
Staff member
Messages
11,750
Reaction score
581
Points
113
Do you have an index file (ie index.html, index.php)? If you have a designated landing page with a different name you'll have to tell the server you want that to load by default, or change its name (and any links going to that file). To tell the server that your landing page should be the one called home.php (as an example) you would need to edit/create .htaccess and add the following (without quotes): "DirectoryIndex home.php". Change home.php to match your file.

Were you previously having the domain show a directory listing?
If you did you will now need to edit/create .htaccess and add the following line (without quotes): "Options +Indexes". This is due to the directorly listing being turned of by default for security.

If none of the above works, let me know and I'll investigate further.
 

carlart2

Member
Messages
31
Reaction score
0
Points
6
Do you have an index file (ie index.html, index.php)? If you have a designated landing page with a different name you'll have to tell the server you want that to load by default, or change its name (and any links going to that file). To tell the server that your landing page should be the one called home.php (as an example) you would need to edit/create .htaccess and add the following (without quotes): "DirectoryIndex home.php". Change home.php to match your file.

Were you previously having the domain show a directory listing?
If you did you will now need to edit/create .htaccess and add the following line (without quotes): "Options +Indexes". This is due to the directorly listing being turned of by default for security.

If none of the above works, let me know and I'll investigate further.



I have a .htaccess file. In my DirectAdmin panel, in the file manager, there is a root folder and in this folder, there is a folder called "domains." In the domains folder, there is a folder that has the same name as my website address. The public_html folder is in there. The .htaccess file is in the public_html folder. The wp-admin folder is also in the public_html folder. The index.php file is in the wp-admin folder. So, does this information change what you said? Or, do I still have to do what you said?
 

carlart2

Member
Messages
31
Reaction score
0
Points
6
Do you have an index file (ie index.html, index.php)? If you have a designated landing page with a different name you'll have to tell the server you want that to load by default, or change its name (and any links going to that file). To tell the server that your landing page should be the one called home.php (as an example) you would need to edit/create .htaccess and add the following (without quotes): "DirectoryIndex home.php". Change home.php to match your file.

Were you previously having the domain show a directory listing?
If you did you will now need to edit/create .htaccess and add the following line (without quotes): "Options +Indexes". This is due to the directorly listing being turned of by default for security.

If none of the above works, let me know and I'll investigate further.


Where exactly do I add "DirectoryIndex home.php" in the .htaccess file? What part of the file do I add this line? Also, how can I tell whether or not I have a designated landing page?
 

Anna

I am just me
Staff member
Messages
11,750
Reaction score
581
Points
113
I'd say you are missing at least the index.php that should be in /root/domains/your_domain/public_html, a quick way to solve it would be to replace all files/folders with fresh ones from wordpress as there may be other files missing. Do not remove/replace wp-content as that is where your uploads and installed plugins are located.

We do ofcourse have backups, so we can restore from those if needed, but that can take a couple days since I don't personally have that access.

Where exactly do I add "DirectoryIndex home.php" in the .htaccess file? What part of the file do I add this line? Also, how can I tell whether or not I have a designated landing page?

Given that you have a wordpress install (judging from file and foldernames) that statement doesnt apply to you. It is more for those that code their own sites and may have chosen a different filename as their starting point.
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
@ carlart2
You should have an index.php in the root (public_html) folder.
this is where apache would look for the index.php page.
unless your htaccess file redirects apache to a different index file.
 

carlart2

Member
Messages
31
Reaction score
0
Points
6
@ carlart2
You should have an index.php in the root (public_html) folder.
this is where apache would look for the index.php page.
unless your htaccess file redirects apache to a different index file.


Then why is the index.php file in the wp-admin folder? The wp-admin folder is in the public_html folder.
 

carlart2

Member
Messages
31
Reaction score
0
Points
6
@ carlart2
You should have an index.php in the root (public_html) folder.
this is where apache would look for the index.php page.
unless your htaccess file redirects apache to a different index file.


Should I move the index.php file, that's in the wp-admin folder, to the public_html folder?
 

carlart2

Member
Messages
31
Reaction score
0
Points
6
I'd say you are missing at least the index.php that should be in /root/domains/your_domain/public_html, a quick way to solve it would be to replace all files/folders with fresh ones from wordpress as there may be other files missing. Do not remove/replace wp-content as that is where your uploads and installed plugins are located.

We do ofcourse have backups, so we can restore from those if needed, but that can take a couple days since I don't personally have that access.



Given that you have a wordpress install (judging from file and foldernames) that statement doesnt apply to you. It is more for those that code their own sites and may have chosen a different filename as their starting point.


I have a backup of my WordPress website. Should I replace the files that's in the DirectAdmin public_html folder with the files that's in my backup?
 

Anna

I am just me
Staff member
Messages
11,750
Reaction score
581
Points
113
Yes, that is probably the best course of action. That way your missing files will automatically be replaced with ones that match your install version.
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
@ carlart2
Just for the record, the index.php file that's in the wp-admin folder,
stays there, thats a different file anyway, its intended for that folder.
but hopefully the backup files will fix it for you.
 

carlart2

Member
Messages
31
Reaction score
0
Points
6
Yes, that is probably the best course of action. That way your missing files will automatically be replaced with ones that match your install version.


I replaced the files and, so far, my website is up and running again. Thanks a lot!
 
Status
Not open for further replies.
Top