且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从url cakephp中删除index.php

更新时间:2023-02-22 09:47:46

检查 mod_rewrite 模块是否已安装?如果不是在 httpd.conf 文件中友好地启用它。

Check the mod_rewrite module is installed or not? if not kindly enable it in httpd.conf file.

查找以下行并删除(表示取消注释)。

Find the following line and remove # (means uncomment) in front of it.

 LoadModule rewrite_module modules/mod_rewrite.so

也不要忘记使用以下命令重新启动apache http服务:

Also don't forget to restart apache http service using following command:

 service httpd restart

从CPanel编辑http.conf文件的步骤:

Following are the steps to edit http.conf file from CPanel:


  1. 以root用户身份登录到WHM / cPanel。

  2. 打开服务配置部分。

  3. 打开Apache配置部分。


  4. 进行所需的更改,然后单击保存按钮。通过cPanel显示httpd.conf的设置。这会保存更改,然后重新启动Apache以便应用更改。

  1. Log in to WHM/cPanel as the root user.
  2. Open the "Service Configuration" section.
  3. Open the "Apache Configuration" section.
  4. Click "Global Configuration" to access the httpd.conf's settings, as displayed through cPanel.
  5. Make your desired changes, then click the "Save" button. This saves the changes and then reboots Apache so that the changes are applied.

阅读更多: http://www.ehow.com/how_8696084_edit-httpdconf-cpanel.html#ixzz2YRDEgOMT

在IIS服务器阅读此链接以启用mod_rewrite