在正常情况,有两个地方会出现index.html,一个是首页自动跳转到index.html,还有一个是在导航的栏目中,下面给大家说说怎么去掉这个index.html。
1、去除首页跳转index.html
更改index.php页面把 - header('HTTP/1.1 301 Moved Permanently'); header('Location:index.html');替换成include(dirname(__FILE__).'/index.html'); exit();
复制代码2、去除导航中的index.html
我们采用的方法是在标签中替换掉index.html字符 - [field:typeurl function='str_replace("index.html","",@me)'/]
复制代码3、将网站的默认首页设置为index.html
|