【问题标题】:codeigniter url causing error in removing index.phpcodeigniter url 导致删除 index.php 时出错
【发布时间】:2017-04-04 06:33:59
【问题描述】:

我昨天发布了关于从 codeigniter 路径中删除索引点 php 的问题,但问题没有解决......所以任何人都可以加入团队查看器并解决我的问题......?感谢期待

我在根文件夹中的 .htaccess

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

【问题讨论】:

  • 您是否在您的网络服务器上启用了重写模式?

标签: php codeigniter wamp teamviewer


【解决方案1】:

您必须将您的 .htaccess 文件移动到 index.php 所在的目录,如果存在,则将其从应用程序目录中删除。

然后将以下代码粘贴到 .htaccess 文件中。

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

我假设您已经执行了其他步骤,包括在 WAMP 和 config.php 中打开重写引擎

$config['index_page'] = 'index.php';

$config['index_page'] = '';

也设置

$config['uri_protocol'] = 'REQUEST_URI';

希望对你有帮助。

【讨论】:

  • 试过但出错了...................................... ................................................ 未找到在此服务器上找不到请求的 URL /si/public/signup。 Apache/2.4.9 (Win64) PHP/5.5.12 服务器在 localhost 端口 80
  • 如何在WAMP中开启重写引擎
  • 点击:WAMP icon->Apache->Apache modules->选择rewrite_module重启所有服务
  • 如果有帮助请告诉我。
猜你喜欢
  • 1970-01-01
  • 2018-10-24
  • 1970-01-01
  • 2013-07-31
  • 2016-05-14
  • 2014-10-28
  • 2012-06-15
  • 2012-09-21
相关资源
最近更新 更多