删除index.php从PHP中删除PHP [英] Remove index.php Cake PHP from url

查看:222
本文介绍了删除index.php从PHP中删除PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是CAKEPHP的新用户。我从服务器复制文件并导入到localhost。 css和图像did not加载。我取消注释
Configure :: write('App.baseUrl',env('SCRIPT_NAME'));现在网站正在显示,但网址包含index.php。

I'm new to CAKEPHP . I copied the files from the server and imported to localhost. The css and images didnt loaded. I uncommented the Configure::write(‘App.baseUrl’, env(‘SCRIPT_NAME’)); and now website is displaying but the url includes index.php.

推荐答案

1)打开 mod_rewrite

2)注释 Configure :: write('App.baseUrl',env('SCRIPT_NAME')); 这一行从/confige/core.php

2) comment " Configure::write('App.baseUrl', env('SCRIPT_NAME')); " this line from /confige/core.php

这篇关于删除index.php从PHP中删除PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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