codeIgniter 4重写去掉index.php有问题
本帖最后由 zc309268032 于 2018-10-11 10:17 编辑C:\Users\Administrator\Desktop\a.jpg
该开启的也可开启了,也按文档这样配置了,还是没有反应啊
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1
</IfModule>
服务器重写也开启了,我域名直接定向到public这个目录的
建议别用 apache。。。。。。 Hex 发表于 2018-10-11 10:42
建议别用 apache。。。。。。
嗯,,我找了点资料解决了,,在apache下我是这样用的
RewriteRule ^(.*)$ index.php?/$1 就能行。。。我也是无语 zc309268032 发表于 2018-10-11 12:01
嗯,,我找了点资料解决了,,在apache下我是这样用的
RewriteRule ^(.*)$ index.php?/$1 就能行。 ...
现在各大互联网公司都用 nginx,没人用 apache 了。。。。 如果是IIS的话,安装url 重写模块;
然后增加规则就可以了;
页:
[1]