第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > apache 配置rewrite模块 URL中隐藏index.php

apache 配置rewrite模块 URL中隐藏index.php

时间:2018-12-31 14:03:48

相关推荐

apache 配置rewrite模块 URL中隐藏index.php

打开httpd.conf

去掉下面的井号

#LoadModule rewrite_module modules/mod_rewrite.so把前面的警号去掉

在网站根目录添加.htaccess

RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [L]

重启服务器

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。