实际上我想在opencart中为我的站点地图页面添加元数据,所以我如何在站点地图页面中添加标题描述和关键词,是否有任何代码可以在该页面中添加?
我的网站标题标记看起来像<title></title>
当我看到我的站点地图页面并在视图源中看到然后我看到这个标签没有任何单词所以我想在该标签之间添加一些标题
关于
的第二个问题我需要从
更改网址Mysite.com/productname
要
Mysite.com/category/brand/productname
答案 0 :(得分:0)
完全。您需要重新提出问题,并且无需搜索此网站。
OpenCart Admin -> Catalog -> Categories -> Name -> Data Tab -> SEO Keyword:
品牌/类别(示例) 绿洲/鞋
OpenCart Admin -> Catalog -> Products -> Name -> Data Tab -> SEO Keyword:
?? - 产品名称(产品ID)
56 - 红 - 训练者
Nginx :( .htaccess对于Apache类似,也与Apache .htaccess这已经是启用Opencart SEO Urls之后的标准,nginx需要手动工作)
server {
listen 80;
server_name site.com www.site.com;
root /var/www/www.site.com/web;
index index.php index.html index.htm;
location /admin {
index index.php;
}
location / {
try_files $uri @opencart;
# cat
rewrite ^/oasis/shoes?$ /index.php?route=product/category&path=1 last;
# product
rewrite ^/oasis/shoes/(.*)$ /index.php?route=product/product&path=2&product_id=$1 last;
}
location @opencart {
rewrite ^/(.+)$ /index.php?route=$1 last;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* \.(engine|inc|info|ini|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
deny all;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
制作网址
site.com/oasis/shoes
site.com/oasis/shoes/56-red-trainers