ecshop伪静态问题


ecshop 的商品详情页面是这样的

http://www.xxx.com/goods-21.html

goods-21.html 这样的不利于优化,权重分配

于是把 他改成这样的 http://www.xxx.com/products/21.html

但是网站的模板里面引用资源文件大部分都是相对路径的,导致 资源文件无法正确引用?

如: www.xxx.com/image/dewen.jpg 伪静态后变成: www.xxx.com/products/image/dewen.jpb

问:

有没有一个办法, 在不把模板引用的资源文件改成据对路径的解决方案?

php ecshop

KARUSEL 12 years, 11 months ago
   
  rewrite ^/products/image/(.*)\.(gif|jpg)$    http://www.xxx.com/image/$1.$2  break;
 

我在开绿灯 answered 12 years, 11 months ago

Your Answer