How to remove .html from URL in .htaccess

Permalink
How to remove .html from url?
Like fromhttp://www.example.com/page.html tohttp://www.example.com/page

I followed answers in this stackoverflow questionhttps://stackoverflow.com/questions/5730092/how-to-remove-html-from-...
but it didn't work and missed up my pages,
I thought maybe concrete5 has its own way of doing it?
Can someone help me?

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi tarekmostafa2,

Is this for an external URL you are linking to from within concrete5?
tarekmostafa2 replied on at Permalink Reply
Hi MrKDilkington,

Actually it is the same website, we basically converting html pages to concrete5 pages. We want the users when they go to the old html page, they get redirected to the new concrete5 page.

For example when the user tries to go tohttp://exrx.net/Exercise.html they get redirected tohttp://exrx.net/Exercise
It is basically the same url but without the .html extension, because the new page is a concrete5 page.
MrKDilkington replied on at Permalink Reply
MrKDilkington
@tarekmostafa2

At first guess, I don't think this is concrete5 related.

You are looking to:
- add an .htaccess to remove the .html extension from your old site pages
- add a 301 redirect of the old site pages to the new concrete5 page

I believe this would be handled on your old site.