【问题标题】:htaccess redirection in wamp not workingwamp中的htaccess重定向不起作用
【发布时间】:2018-08-03 18:09:48
【问题描述】:

.htaccess 在托管在服务器上时工作正常,但在 wamp 中不工作。我需要消除 Codeigniter 对 /index.php 的需求。下面是我的代码。

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
#AllowOverride All
RewriteBase /
RedirectMatch 403 ^/(application\/cache|codeigniter|\.git|\.hg).*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.php/$1 [L]
#RewriteRule ^(.*\.html)$ /cms/ [NC]
</IfModule>
<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
</IfModule>

【问题讨论】:

    标签: .htaccess codeigniter


    【解决方案1】:

    原因是我忘记在 Apache 中打开 rewrite_module。 :-(

    【讨论】:

    • 这没有提供问题的答案。要批评或要求作者澄清,请在他们的帖子下方发表评论 - 您可以随时评论自己的帖子,一旦您有足够的reputation,您就可以comment on any post
    • @Manish - 这不是问题的答案吗?按照我的阅读方式,OP 正在回答他自己的问题,告诉我们问题出在哪里。
    • 答案是@Manish...我回答了我自己的问题,.htaccess 没有任何问题...我只是忘记在 Apache 中打开 rewrite_module
    猜你喜欢
    • 2015-03-07
    • 2015-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多