403 Forbidden

Status
Not open for further replies.

gzwcx10h

New Member
Messages
2
Reaction score
0
Points
1
My website is gzwc.x10host.com, this site is working fine after migration.

However, I do have a subdomain website, which is
eng.gzwc.x10host.com and this subdomain website is not working.

When trying to access it from browser, the browser returns the following error message:
"Forbidden
You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe
"

I was using Cpanel to create that subdomain website. How that Cpanel is gone, I do not know how to fix this...

Please help out.

I tried put a line "Options +Indexes" into the file .htaccess, but it did not help out the above issue.
 

Anna

I am just me
Staff member
Messages
11,733
Reaction score
578
Points
113
Should work now, I updated the permissions for that folder, was 750 and is now 755
 

spacresx

Community Advocate
Community Support
Messages
2,182
Reaction score
195
Points
63
@ kmdomain
it would help if you post your website link and the error you are getting.
 

Anna

I am just me
Staff member
Messages
11,733
Reaction score
578
Points
113
My website link is http://kmdomain.x10host.com.
Error is "403 Forbidden"
Forbidden
You don't have permission to access this resource.
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.
 

freedom5

New Member
Messages
19
Reaction score
0
Points
1
where do i put the new code in?? on the opening page?? and no my home page is not default.htm or index.htm.

Rob Friedman
freedomlandusax10host.com
 

spacresx

Community Advocate
Community Support
Messages
2,182
Reaction score
195
Points
63
@ freedom5
new code in your public_html/.htaccess file.
then make sure you have an index.php or index.html file as well.
 

freedom5

New Member
Messages
19
Reaction score
0
Points
1
where do i put the new code in?? on the opening page?? and no my home page is not default.htm or index.htm.

Rob Friedman
freedomlandusax10host.com
plus..I see that the entire site is now in domains vs public. html. Iwant to stay but how can i make it work? can you help??
 

freedom5

New Member
Messages
19
Reaction score
0
Points
1
@ freedom5
new code in your public_html/.htaccess file.
then make sure you have an index.php or index.html file as well.
well...I can't access public_htm. permission is 777. plus the website is not there. and as i said..my home page is freedomland.htm. it's a long story..but if Anna can help e i'd love it
 

spacresx

Community Advocate
Community Support
Messages
2,182
Reaction score
195
Points
63
the path should be like /home/username/domains/the_domain_name/public_html
in the public_html you need a .htaccess file and an index page (like index.php or index.html)
then add "Options +Indexes" no "" to the .htaccess file.
 

freedom5

New Member
Messages
19
Reaction score
0
Points
1
the path should be like /home/username/domains/the_domain_name/public_html
in the public_html you need a .htaccess file and an index page (like index.php or index.html)
then add "Options +Indexes" no "" to the .htaccess file.
I can't access the public_htm folder... damn thing won't open
 

freedom5

New Member
Messages
19
Reaction score
0
Points
1
ok it seems to finally open up. BUT I can't find the HTM files.. Yes I have the page files wit each graphic..but no HTM files... (this is getting more and more confusing)
 

freedom5

New Member
Messages
19
Reaction score
0
Points
1
ok it seems to finally open up. BUT I can't find the HTM files.. Yes I have the page files wit each graphic..but no HTM files... (this is getting more and more confusing)
it looks like a lot if not all the website pages were transferred or copied into other folders.. EXCEPT the HTML files that tell the pages what to do! So Who do I reach out to for help???
 

spacresx

Community Advocate
Community Support
Messages
2,182
Reaction score
195
Points
63
i was just referencing that some people might have index.html
where others would have index.php and .php files.
depending on the website pages they prefer.
for example a wordpress or joomla website would be all .php files.

you need to go to /home/username/domains/the_domain_name/public_html
that public_htm is also called the website root folder. (where you put your website files)
look for a file named .htaccess if there is not one, make one for it.
create a new file and add this code to it. (copy this code as seen)

#
<Files .htaccess>
Order deny,allow
Deny from all
</Files>
#
Options +Indexes
DirectoryIndex index.php
IndexIgnore *
#

then save the file as .htaccess
make sure you have a file called index.php for that to work.

A description of the code:

<Files .htaccess>
Order deny,allow
Deny from all
</Files>
The above code protects your htaccess file from being viewed online.

"Options +Indexes" allows people to access other pages.

"DirectoryIndex index.php" sets the default page that opens when people
visit your website.

"IndexIgnore *" stops people from viewing the files in a certain folder.
without this, people can see a list of files in your folders.

the #'s are just comment areas that are hidden used to separate the code.

keep in mind you dont have to have index.php as a default page.
you can have home.php start.php junk.php or any name,
but to start that page by default change the line "DirectoryIndex index.php"
to match the page you want to start like "DirectoryIndex start.php" and so on.
hope this helps.
 

freedom5

New Member
Messages
19
Reaction score
0
Points
1
i was just referencing that some people might have index.html
where others would have index.php and .php files.
depending on the website pages they prefer.
for example a wordpress or joomla website would be all .php files.

you need to go to /home/username/domains/the_domain_name/public_html
that public_htm is also called the website root folder. (where you put your website files)
look for a file named .htaccess if there is not one, make one for it.
create a new file and add this code to it. (copy this code as seen)

#
<Files .htaccess>
Order deny,allow
Deny from all
</Files>
#
Options +Indexes
DirectoryIndex index.php
IndexIgnore *
#

then save the file as .htaccess
make sure you have a file called index.php for that to work.

A description of the code:

<Files .htaccess>
Order deny,allow
Deny from all
</Files>
The above code protects your htaccess file from being viewed online.

"Options +Indexes" allows people to access other pages.

"DirectoryIndex index.php" sets the default page that opens when people
visit your website.

"IndexIgnore *" stops people from viewing the files in a certain folder.
without this, people can see a list of files in your folders.

the #'s are just comment areas that are hidden used to separate the code.

keep in mind you dont have to have index.php as a default page.
you can have home.php start.php junk.php or any name,
but to start that page by default change the line "DirectoryIndex index.php"
to match the page you want to start like "DirectoryIndex start.php" and so on.
hope this helps.
all my pages were htm..not php . I do not even know what a php file is
i was just referencing that some people might have index.html
where others would have index.php and .php files.
depending on the website pages they prefer.
for example a wordpress or joomla website would be all .php files.

you need to go to /home/username/domains/the_domain_name/public_html
that public_htm is also called the website root folder. (where you put your website files)
look for a file named .htaccess if there is not one, make one for it.
create a new file and add this code to it. (copy this code as seen)

#
<Files .htaccess>
Order deny,allow
Deny from all
</Files>
#
Options +Indexes
DirectoryIndex index.php
IndexIgnore *
#

then save the file as .htaccess
make sure you have a file called index.php for that to work.

A description of the code:

<Files .htaccess>
Order deny,allow
Deny from all
</Files>
The above code protects your htaccess file from being viewed online.

"Options +Indexes" allows people to access other pages.

"DirectoryIndex index.php" sets the default page that opens when people
visit your website.

"IndexIgnore *" stops people from viewing the files in a certain folder.
without this, people can see a list of files in your folders.

the #'s are just comment areas that are hidden used to separate the code.

keep in mind you dont have to have index.php as a default page.
you can have home.php start.php junk.php or any name,
but to start that page by default change the line "DirectoryIndex index.php"
to match the page you want to start like "DirectoryIndex start.php" and so on.
hope this helps.
ok typed all that in.
Now I have Intenal Servor Error
The only change I made was on the DirectoryIndex default.htm
feel free to look

Rob Friedman
freedomlandusa.x10host.com
 

spacresx

Community Advocate
Community Support
Messages
2,182
Reaction score
195
Points
63
ok, try removing the "Options +Indexes" first.
if that dont work, add it back and remove "IndexIgnore *"
the 2 indexes may be conflicting with each other.

in my htaccess i dont use the "Options +Indexes"
never had a need to but i do use the "IndexIgnore *" in mine without any issue.
 
Status
Not open for further replies.
Top