403 Forbidden

Discussion in 'Free Hosting' started by gzwcx10h, Jan 28, 2020.

Thread Status:
Not open for further replies.
  1. gzwcx10h

    gzwcx10h New Member

    Messages:
    2
    Likes Received:
    0
    Trophy 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.
     
  2. Anna

    Anna I am just me Staff Member

    Messages:
    10,678
    Likes Received:
    462
    Trophy Points:
    83
    Should work now, I updated the permissions for that folder, was 750 and is now 755
     
  3. gzwcx10h

    gzwcx10h New Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    working now Anna, I love you very much!!! :lol:
     
  4. kmdomain

    kmdomain New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem. Could you help me please?
     
  5. spacresx

    spacresx Active Member

    Messages:
    977
    Likes Received:
    71
    Trophy Points:
    28
    @ kmdomain
    it would help if you post your website link and the error you are getting.
     
  6. kmdomain

    kmdomain New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    My website link is http://kmdomain.x10host.com.
    Error is "403 Forbidden"
    Forbidden
    You don't have permission to access this resource.
     
  7. Anna

    Anna I am just me Staff Member

    Messages:
    10,678
    Likes Received:
    462
    Trophy Points:
    83
    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.
     
  8. kmdomain

    kmdomain New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Yeah! Line with "Options +Indexes" made it work. Thank you so much!!!
     
  9. freedom5

    freedom5 New Member

    Messages:
    15
    Likes Received:
    0
    Trophy 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
     
  10. spacresx

    spacresx Active Member

    Messages:
    977
    Likes Received:
    71
    Trophy Points:
    28
    @ freedom5
    new code in your public_html/.htaccess file.
    then make sure you have an index.php or index.html file as well.
     
  11. freedom5

    freedom5 New Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    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??
     
  12. freedom5

    freedom5 New Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  13. spacresx

    spacresx Active Member

    Messages:
    977
    Likes Received:
    71
    Trophy Points:
    28
    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.
     
  14. freedom5

    freedom5 New Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    I can't access the public_htm folder... damn thing won't open
     
  15. freedom5

    freedom5 New Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    not the one IN the domain..(where the website is)..the one in the root directory
     
  16. freedom5

    freedom5 New Member

    Messages:
    15
    Likes Received:
    0
    Trophy 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)
     
  17. freedom5

    freedom5 New Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    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???
     
  18. spacresx

    spacresx Active Member

    Messages:
    977
    Likes Received:
    71
    Trophy Points:
    28
    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.
     
  19. freedom5

    freedom5 New Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    all my pages were htm..not php . I do not even know what a php file is
    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
     
  20. spacresx

    spacresx Active Member

    Messages:
    977
    Likes Received:
    71
    Trophy Points:
    28
    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.
     
Thread Status:
Not open for further replies.

Share This Page