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!

Webpage without the .html extension issue

Discussion in 'General Discussion' started by nleeio, Jun 24, 2018.

  1. nleeio

    nleeio Registered

    Jun 24, 2018
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Website Owner

    I recently uploaded a number of html and css files on to CPanel. I'm running into issues when trying to access other pages on my website.

    For example: > gallery (
    - I get a 403 error, my gallery page is located in the same folder as my index.html
    - it also doesnt recognise/can't access my .css file (exact same one used by index.html)
    - In my index file I have it like this: <li><a href="/gallery">G A L L E R Y</a>
    - However, works just fine.

    I have no problem loading my blog page (
    - the .html version works fine too
    - I am able to load the page without .html
    - In my index file I have it like this: <li><a href="/blog">B L O G</a>
    - also noticed there isn't an extra "/" at the end of the url

    This is my .htcaccess file:
    DirectoryIndex index.html will display the contents of
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.html -f
    RewriteRule ^(.+)$ $1.html [L,QSA]

    #301 from to
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/
    RewriteRule ^(.*)\.html$ /$1 [R=301,L]

    I would appreciate any help with this issue, I want to be able to load my gallery page without the .html extension
    #1 nleeio, Jun 24, 2018
    Last edited by a moderator: Jun 24, 2018
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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