一、确认mod_speling.so模块存在
#cd /usr/lib/httpd/modules
二、编写配置文件,加载mod_speling.so
#vi /etc/http/conf/httpd.conf
在其中加入:
LoadModule speling_module modules/mod_speling.so #若这个无效,可写成如下:
LoadModule speling_module /usr/lib/httpd/modules/mod_speling.so #设置详细路径
再加一句以开启speling
CheckSpelling On
配置文件写好了,保存退出。
三,重新启动apache,就可以了,如访问https://www.okxun.com/index.html,同样可以写成
https://www.okxun.com/INDEX.HTML。
提示:据说speling模块会降低apche的执行效率。