Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
283 views
in Technique[技术] by (71.8m points)

apache - How to get rid of .html in file website url

Im running a simple Apache2 web server and I would like to make it so my pages dont have the following .html and could just be for example website.com/home and not website.com/home.html

question from:https://stackoverflow.com/questions/65838320/how-to-get-rid-of-html-in-file-website-url

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To hide the .html in the url of the files:

Options MultiViews #add this to the .htaccess file

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...