相关疑难解决方法(0)

PRESTASHOP NGINX + REWRITE规则

我正在寻找这个组合的好解决方案,并在遵循这些后:

  1. http://www.phamviet.net/2012/06/03/prestashop-rewrite-url-on-nginx/
  2. Prestashop的Nginx配置
  3. Prestashop 1.5.6.2通过nginx安装重写URL

他们似乎都没有为我工作......所以我开始尝试:

配置SSL,CloudFlare等后....

这是我试过的:

server {
  listen 80;
  server_name mysuperdomain.com www.mysuperdomain.com;
  rewrite ^ https://$server_name$request_uri? permanent;
}

server {
  # listen 80 deferred; # for Linux
  # listen 80 accept_filter=httpready; # for FreeBSD
  listen 443;

  # The host name to respond to
  server_name mysuperdomain.com *.mysuperdomain.com;

  # Path for static files
  root /sites/mysuperdomain.com/public;

  ssl on;
  ssl_certificate /etc/nginx/ssl/ssl.pem;
  ssl_certificate_key /etc/nginx/ssl/ssl.key;

  # Try static files first, then php
  index index.html index.htm index.php;

  # Specific logs for this vhost
  access_log /sites/mysuperdomain.com/log/log-access.log; …
Run Code Online (Sandbox Code Playgroud)

.htaccess nginx prestashop prestashop-1.6

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

.htaccess ×1

nginx ×1

prestashop ×1

prestashop-1.6 ×1