skip to Main Content

I have a 5 pages static website. On the logo, I have the link for homepage index.html. When I click on the logo it redirects me to homepage and changes the URL in address bar to www.mydomain.com/index.html.

For some SEO purpose, I want this url to remain as www.mydomain.com/ without the index.html at the end of the URL.

How can I achieve this? Does this require any rule in .htaccess or any other solution?

2

Answers


  1. Just change the link to point to / instead of /index.html. Apache will route any request made to / to a fitting index file.

    Login or Signup to reply.
  2. /* in place of index.html use “/” then it will go to home page /*

     <!-- instead of this -->
     <a href="index.html">home</a>
     <!-- use like this -->
     <a href="/">home</a>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search