1

I have a domain that currently redirects www.example.com to example.com.

It is hosted on gh-pages.

However, there is a resource link I access from index.html called privacy.html via <a href=privacy.html>Privacy Policy<a>.

When the user clicks that link, he/she gets redirected to example.com/privacy.html rather than example.com/privacy.

How do I set this up so it doesn't have any .html at the end?

0

If you host your site on github pages and you want to access your file name without extension, then make sure your index.html page is hosted on parent directory/folder.

For example. for privacy page, host your index.html like this

/privacy/index.html

This page can accessible in browser with - /privacy/ also with /privacy/index.html

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.