Reputation: 107
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?
Upvotes: 1
Views: 3616
Reputation: 304
/* 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>
Upvotes: 2
Reputation: 4544
Just change the link to point to /
instead of /index.html
. Apache will route any request made to /
to a fitting index file.
Upvotes: 2