隐藏入口文件

来源:互联网 发布:淘宝交易快照怎么看 编辑:程序博客网 时间:2024/05/29 10:54
MAMP启用Apache的隐藏入口文件URL重写规则\mamp\config\apache\httpd.conf文件第130行 rewrite_module打开LoadModule rewrite_module modules/mod_rewrite.so第239行 网站的目录地址下AllowOverride None 改成 AllowOverride All重启MAMP服务器URL重写规则启用tp\public\.htaccess文件重写的,没有就报错Not Found扩展
对与http://localhost:8089/index/index/index这种格式的url 要在.htaccess文件的  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]句子的index前加上?,代表匹配端口号,  完整RewriteRule ^(.*)$ ?index.php/$1 [QSA,PT,L]