【问题标题】:Redirection issues in Live serverLive 服务器中的重定向问题
【发布时间】:2017-04-12 08:18:51
【问题描述】:

我的 .htaccess 是

<IfModule mod_rewrite.c>

    Options +FollowSymLinks
    RewriteEngine on

    RewriteRule ^([a-z0-9_-]+)\.html$ index.php/page/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond $1 !^(index\.php|asset|robots\.txt)
    RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

</IfModule>

但它在 mochahost 中不起作用我尝试了几次但它不起作用。我该如何解决这个问题?

【问题讨论】:

  • 你用的是什么版本的codeigniter,你用的是xampp还是wamp?
  • 你的实时服务器上是否激活了 mod_rewrite
  • 这和mysql有什么关系?

标签: .htaccess


【解决方案1】:

在 .htaccess 中尝试此代码对我有用........

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-09-09
    • 1970-01-01
    • 1970-01-01
    • 2016-01-21
    • 2017-04-19
    • 2016-05-16
    • 1970-01-01
    相关资源
    最近更新 更多