当前位置:论坛首页 > Linux面板 > 建议

为什么没有opencart的nginx 伪静态?

发表在 Linux面板2019-4-22 15:37 [复制链接] 2 2671

官方是否可以加上?
使用道具 举报 只看该作者 回复
发表于 2019-6-25 02:29:06 | 显示全部楼层
我找到并且测试可用, 所以还是这里回复并备用.

# SEO URL Settings
  # Nginx configuration of OC htaccess
  location = /sitemap.xml {
    rewrite ^(.*)$ /index.php?route=feed/google_sitemap break;
  }

  location = /googlebase.xml {
    rewrite ^(.*)$ /index.php?route=feed/google_base break;
  }

  location / {
    # This try_files directive is used to enable SEO-friendly URLs for OpenCart
    try_files $uri $uri/ @opencart;
  }

  location @opencart {
    rewrite ^/(.+)$ /index.php?_route_=$1 last;
  }
  # End SEO settings
使用道具 举报 回复 支持 反对
发表于 2019-7-26 10:15:43 | 显示全部楼层
请问支付宝异步回调的伪静态要怎么写呢,Apache是 RewriteRule ^payment_callback/(.*) index.php?route=extension/payment/$1/callback [QSA]
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

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