用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1526|回复: 1
收起左侧

[HELP] 阿里云ecs,免费ssl证书,apache,配置https后资源404

[复制链接]
发表于 2019-12-16 20:36:55 | 显示全部楼层 |阅读模式
本帖最后由 天水依然 于 2019-12-16 20:46 编辑

QQ截图20191216203334.png


QQ截图20191216204602.png

.htaccess

  1. <IfModule mod_rewrite.c>
  2. Options +FollowSymlinks -Multiviews
  3. RewriteEngine On

  4. RewriteCond $1 !^(index\.php|robots\.txt|resources)
  5. RewriteCond %{SERVER_PORT} !^443$

  6. RewriteRule ^(.*)?$ https://%{SERVER_NAME}/$1 [L,R]
  7. RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
  8. </IfModule>

复制代码

请教大侠???
 楼主| 发表于 2019-12-18 09:14:03 | 显示全部楼层
  1. <IfModule mod_rewrite.c>
  2. Options +FollowSymlinks -Multiviews
  3. RewriteEngine On
  4. RewriteBase /
  5. RewriteCond $1 !^(index\.php|robots\.txt|resources|static|uploads)
  6. RewriteCond %{HTTPS} !=on
  7. RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  8. RewriteCond %{REQUEST_FILENAME} !-f
  9. RewriteCond %{REQUEST_FILENAME} !-d
  10. RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
  11. </IfModule>

复制代码



rewrite的不对,这样就能打开了。

本版积分规则