坏蛋网络

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
开启左侧

[服务器] Chevereto Nginx 伪静态Rewrite规则图床

[复制链接]
坏蛋网络男神 实名认证 官方 发表于 2021-4-23 11:49:02 | 显示全部楼层 |阅读模式
Chevereto Nginx 伪静态Rewrite规则
Chevereto 是目前最为强大的 PHP 图床系统,通过它可部署多用户公开或私有的图片存储服务,现在 Chevereto 出了免费的版本,小伙伴可以围观一下。
Chevereto 默认提供基于 Apache 环境的伪静态规则,如果服务器是 Nginx 则需要设置以下Rewrite 伪静态规则:
  1. # Image not found replacement
  2. location ~* (jpe?g|png|gif) {
  3.         log_not_found off;
  4.         error_page 404 /content/images/system/default/404.gif;
  5. }

  6. # CORS header (avoids font rendering issues)
  7. location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
  8.         add_header Access-Control-Allow-Origin "*";
  9. }

  10. # Pretty URLs
  11. location / {
  12.         try_files $uri $uri/ /index.php?$query_string;
  13. }
  14. location /admin {
  15.     try_files $uri /admin/index.php?$args;
  16. }
复制代码


想说又不敢说,说了又怕被拒绝,拒绝了又怕尴尬,就是这样的。内心很痛苦的那种。
Q1K巍巍 发表于 2022-6-26 18:26:11 | 显示全部楼层
不错 支持下
回复

使用道具 举报

测试 发表于 2022-6-26 23:53:58 | 显示全部楼层
真是 收益 匪浅
回复

使用道具 举报

江山狂念 发表于 2022-6-27 13:50:27 | 显示全部楼层
路过,学习下
回复

使用道具 举报

测试 发表于 2022-6-30 09:31:44 | 显示全部楼层
帮你顶下哈!!
回复

使用道具 举报

hgfhgf 发表于 2022-6-30 11:21:50 | 显示全部楼层
我是来刷分的,嘿嘿
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表