【发布时间】: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