skip to Main Content

This may be a dumb question, but after I load my webpages through GoDaddy’s cPanel, every page won’t work unless it has a .html at the end of it. Am I doing something wrong when I’m uploading it? It doesn’t seem normal to need .html at the end of every page.

2

Answers


  1. Chosen as BEST ANSWER

    I might not have asked the question as clearly as I should. I ended up figuring out the answer regarding removing the .html from the webpage url.

    Create a file called .htaccess in the root directory and add this code:

        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^([^.]+)$ $1.html [NC,L]
    

    And then all the links on your site should look like this:

    <a href="/portfolio">
    

  2. The files are probably written in HTML which is the most common. So if you are making new windows you must add .html at the back so the browser knows it needs to read html code and not something else. So if you were to make an “about us” page you need to save it as about-us.html

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search