如何停止.html在网址中显示? [英] How to stop .html showing up in the url?

查看:62
本文介绍了如何停止.html在网址中显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个非常简单的修复程序,但是如何设置它,所以当您访问我的网站(www.skidsfordays.com)时,它会显示jsut,而不是www.skidsfordays.com/index.html,然后网站上的每个页面后都有.html.我怎样才能解决这个问题?谢谢.

This is probably a really simple fix, but how do I set it so when you go to my site (www.skidsfordays.com) it jsut comes up as that and not www.skidsfordays.com/index.html and then every page on the site has .html after it. How can I fix this? Thanks.

推荐答案

在您的Web根目录中创建.htaccess,并在其中添加以下行:

Create a .htaccess in your web root directory and add the following line into it:

Options +Multiviews

->完成.

这意味着服务器不需要文件扩展名(例如:.html,.php)来加载请求的文件.

This means, that the server does not require the file extension (for example: .html, .php ) to load the requested file.

这篇关于如何停止.html在网址中显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆