Codeigniter重定向功能在Mac系统中不起作用

时间:2013-04-29 04:31:53

标签: codeigniter url redirect codeigniter-routing url-helper

我在Windows(xampp)中有一个CI项目(安装了HVMC)。一切正常,但当我将我的项目移动到Mac(已经安装了xampp)时,某些东西对我来说不起作用。

  1. “重定向”功能在登录和注销时效果很好。

  2. 尝试通过此链接编辑一行:

    http://myproject.local/article/article/edit/10

  3. 第1篇是模块,第2篇是控制器,编辑是功能,10是行id

    1. 提交表单时,我使用:redirect('article / article / index')重定向到索引页面,但它不起作用(它只显示一个空白页面,当URL仍然是:

      http://myproject.local/article/article/edit/10

    2. 在Windows中,它适用于我,但在Mac上却没有。

      启用了Mod_rewrite。

      我的.htaccess:

          RewriteEngine On
      RewriteBase /
      
      #Removes access to the system folder by users.
      #Additionally this will allow you to create a System.php controller,
      #previously this would not have been possible.
      #'system' can be replaced if you have renamed your system folder.
      RewriteCond %{REQUEST_URI} ^system.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]
      
      #When your application folder isn't in the system folder
      #This snippet prevents user access to the application folder
      #Submitted by: Fabdrol
      #Rename 'application' to your applications folder name.
      RewriteCond %{REQUEST_URI} ^application.*
      RewriteRule ^(.*)$ /index.php?/$1 [L]
      
      #Checks to see if the user is attempting to access a valid file,
      #such as an image or css document, if this isn't true it sends the
      #request to index.php
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?/$1 [L]
          php_flag display_errors On
      

      我该怎么办才能修复它?

      提前致谢!

0 个答案:

没有答案