Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

URLs with a dot return 403 Forbidden

Discussion in 'General Discussion' started by OgreVorbis, Feb 14, 2019.

  1. OgreVorbis

    OgreVorbis Registered

    Joined:
    Feb 14, 2019
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    US
    cPanel Access Level:
    Website Owner
    Hi,

    I am new to this site and somewhat new to web hosting also. I am working on my first "real" website. I have been a programmer for a very long time, but I do C# and not web development, however, I was able to pick it up pretty quick because of this.

    So I am having a problem with a site that I just uploaded to a free web host that uses cPanel. I was testing the site on my own Apache server for a while and it was working fine, but after uploading to the real site, I am having a problem. There is a part of the site that has a file browser programmed in PHP. In order to hide the "operating files" from the user who is browsing, I use a dot (period) preceding the file name. On my own server this worked fine, but on the cPanel server, I am getting 403 Forbidden with anything that is hidden using the period.

    I am pretty new to this. Could anyone help me figure out what I need to change about the server to make it working?

    The alternative would be to reprogram the file browser, but based on the way it's made it would be a complete pain in the ass to make it work without the .hidden files.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @OgreVorbis


    This is an Apache Configuration to disallow viewing hidden files. You can make changes to the Apache configuration through WHM>>Service Configuration>>Apache Configuration>> Global Configuration as well as the Include Editor.

    But rather than allow viewing hidden files which I wouldn't advise, why not password protect the file?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice