का उपयोग कर ओपनकार्ट पर बहु स्टोर्स और सबडोमेन पर एसईओ यूआरएल सक्षम करें। मैं ओपनकार्ट में बहु-स्टोर्स में एसईओ यूआरएल काम करने की कोशिश कर रहा हूं।Nginx
मैं व्यवस्थापक
http://www.shop.com (default)
http://m.shop.com
एसईओ यूआरएल http://www.shop.com के लिए काम में दो भंडार है लेकिन वे एक not_found.tpl http://m.shop.com
के लिए (404 पेज) लौट हालांकि यह काम करता है:
http://m.shop.com/index.php?route=product/product&path=68&product_id=52
एसईओ वार, यह
होना चाहिए 210/index.php?route=product/product&path=68&product_id=52
http://www.shop.com/product-title
http://m.shop.com/product-title (404 returned)
मैं एनजीआईएनएक्स का उपयोग कर रहा हूं।
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;
}
}
यदि मुझे गलत नहीं है, तो ये सेटअप बिल्कुल वही दिखते हैं। आप केवल 'सर्वर {...} 'अनुभाग का उपयोग क्यों नहीं करते हैं और' m.shop.com' को' server_name' निर्देश में जोड़ते हैं? आपकी गलती के लिए, मेरे सिर के शीर्ष से मेरे पास केवल एक दूर अनुमान है: क्या आपकी 'm.shop.com' कॉन्फ़िगर वास्तव में सक्रिय है? उन्हें कभी-कभी कॉन्फ़िगरेशन फ़ाइलों के साथ एक निर्देशिका में व्यवस्थित किया जाता है, और एक ऐसा जहां आप इसे एक सिम्लिंक रखना चाहते हैं। लिंक वहाँ है, है ना? – Carsten
लिंक वहां है .. साइट काम करती है .. m.shop.com साइट काम करती है और यह अन्य ओपनकार्ट स्टोर दिखाती है - एसईओ यूआरएल हालांकि काम नहीं करते हैं। – TheBlackBenzKid
मुझे ओपन कार्ट के साथ अनुभव नहीं है, हालांकि, अगर आपको nginx के माध्यम से ऐसा करना है तो मैं उत्सुक हूं? यदि नहीं, तो आप सिर्फ .htaccess फ़ाइल को संशोधित नहीं कर सकते हैं और एक मॉड रीराइट का उपयोग कर सकते हैं। यहां एक उदाहरण है जो मैंने एक स्टोर [उदाहरण] (http://www.templatemonster.com/help/files/OpenCart/opencart_seo_urls.htm) के साथ पाया है। शायद यह सहायक होगा। – Dropzilla