ecshop电脑版开启伪静态,手机版就无法完全正常访问

ecshop电脑版开启伪静态,手机版就无法完全正常访问,第1张

我们也碰到过同样的问题,终于解决了!网上有太多的人说的都不对,通过反复试验我们才成功,今天跟大家分享一下吧!FTP手机站的目录(我们的是htdocs/mobile)也有个htaccess.txt,把这个文件重命名为“.htaccess”,然后在网站后台右上角点“清除缓存”,再在手机站刷新就可以了!(如果手机站的目录里有2个 htaccess.txt 文件,就一个一个试,总有一个是可以的!而且只能保留一个!)纯手打,望采纳哦!!!

将ecshop专题伪静态化的规则方法

IIS规则:

RewriteRule ^(.*)/topic-([0-9]+)\.html$ $1/topic\.php\?topic_id=$2

Apache规则:

RewriteRule ^topic-([0-9]+)\.html$ topic\.php\?topic_id=$1 [QSA,L]

为了避免重复收录动态的页面,建议robots里加上

Disallow: /topic.php?

建议修改下伪静态规则,参考如下

#ecshop伪静态

RewriteRule /index.html   /index.php 

RewriteRule /default.html /index.php 

RewriteRule /ecshop/feed.xml   /ecshop/feed.php 

#RewriteRule /ecshop/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /ecshop/category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 

RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&page=$4&sort=$5&order=$6 

#RewriteRule /ecshop/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ /ecshop/category.php?id=$1&brand=$2&page=$3  

RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&page=$4  

#RewriteRule /ecshop/category-([0-9]+)-b([0-9]+)(.*)\.html$ /ecshop/category.php?id=$1&brand=$2  

RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3  

#RewriteRule /ecshop/category-([0-9]+)(.*)\.html$     /ecshop/category.php?id=$1  

RewriteRule ^(.*)/category-([0-9]+)(.*)\.html$     $1/category\.php\?id=$2  

#RewriteRule /ecshop/goods-([0-9]+)(.*)\.html$     /ecshop/goods.php?id=$1 

RewriteRule ^(.*)/goods-([0-9]+)(.*)\.html$ $1/goods\.php\?id=$2

#RewriteRule /ecshop/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /ecshop/article_cat.php?id=$1&page=$2&sort=$3&order=$4  

RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3&sort=$4&order=$5  

#RewriteRule /ecshop/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ /ecshop/article_cat.php?id=$1&page=$2 

RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3 

#RewriteRule /ecshop/article_cat-([0-9]+)(.*)\.html$ /ecshop/article_cat.php?id=$1 

RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2 

#RewriteRule /ecshop/article-([0-9]+)(.*)\.html$     /ecshop/article.php?id=$1 

RewriteRule ^(.*)/article-([0-9]+)(.*)\.html$     $1/article\.php\?id=$2 

#RewriteRule /ecshop/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html /ecshop/brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 

RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3&page=$4&sort=$5&order=$6 

#RewriteRule /ecshop/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html /ecshop/brand.php?id=$1&cat=$2&page=$3 

RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3&page=$4 

#RewriteRule /ecshop/brand-([0-9]+)-c([0-9]+)(.*)\.html /ecshop/brand.php?id=$1&cat=$2 

RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3 

#RewriteRule /ecshop/brand-([0-9]+)(.*)\.html     /ecshop/brand.php?id=$1 

RewriteRule ^(.*)/brand-([0-9]+)(.*)\.html     $1/brand\.php\?id=$2 

#RewriteRule /ecshop/tag-(.*)\.html    /ecshop/search.php?keywords=$1 

RewriteRule ^(.*)/tag-(.*)\.html    $1/search\.php\?keywords=$2

#ecshop伪静态,实际的伪静态规则还是需要根据自己的程序的需求来添加相应的伪静态规则的!


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/423599.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-25
下一篇2023-05-25

发表评论

登录后才能评论

评论列表(0条)

    保存