I am trying to get SEO URLs working across multi-stores in OpenCart.
I have two stores in the admin
http://www.shop.com (default)
http://m.shop.com
SEO URLs work for http://www.shop.com But they return a not_found.tpl (the 404 page) for the http://m.shop.com
This works however:
http://m.shop.com/index.php?route=product/product&path=68&product_id=52
SEO wise, it should be
/index.php?route=product/product&path=68&product_id=52
http://www.shop.com/product-title
http://m.shop.com/product-title (404 returned)
I am using NGINX. This is the config:
www.shop.com
server {
server_name www.shop.com;
listen 80;
root /var/www/www.shop.com/;
index index.php index.html;
location /image/data {
autoindex on;
}
location / {
try_files $uri @opencart;
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
m.shop.com
server {
server_name m.shop.com;
listen 80;
root /var/www/www.shop.com/;
index index.php index.html;
location /image/data {
autoindex on;
}
location / {
try_files $uri @opencart;
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}