【问题标题】:rewrite rules for codeigniter重写codeigniter的规则
【发布时间】:2018-01-15 15:27:35
【问题描述】:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

你能给我解释一下吗?似乎有太多,他们做同样的事情。请注意,我正在使用这些从代码点火器的 URL 中删除 index.php。

为什么会有 ?标记 index.php?

【问题讨论】:

    标签: codeigniter url-rewriting


    【解决方案1】:

    This article(包括注释代码)解释了当您从 URL 中删除 index.php 时您在做什么以及基本原理。

    【讨论】:

      猜你喜欢
      • 2015-03-04
      • 2013-10-21
      • 1970-01-01
      • 2015-02-15
      • 1970-01-01
      • 2010-09-25
      • 1970-01-01
      • 2014-04-12
      相关资源
      最近更新 更多