mymps5.9开启伪静态后,手机版也伪静态了?

linziqu

linziqu

发表于 2020-05-29 11:10:40

手机版的伪静态我设置为这样后,输入的链接正常应该是 http://www.xxx.com/fangchan

现在输出的是 http://www.xxx.com/mhttp://www.xxx.com/fangchan

我少加了个啥?

目前伪静态规则如下:

RewriteEngine On
RewriteBase /
RewriteRule ^space/(.+)\/$ space\.php\?user=$1
RewriteRule ^store-([0-9]+)\/$ store\.php\?uid=$1
RewriteRule ^store-([0-9]+)/([^\/]+).html$ store\.php\?uid=$1&Uid=$2
RewriteCond %{REQUEST_FILENAME} !-d

#下面这行是分类/信息:拼音伪静态名,不需要增加:#注释掉,与13,14行要对应
RewriteRule ^(?!store|mayicms|space)(.+)/$ category\.php\?Catid=$1
RewriteRule ^([^\/]+)/([0-9]+)\.html$ information\.php\?id=$2

#下面是手机版分类/信息:拼音伪静态名
RewriteRule ^m/([^\/]+)/([0-9]+)\.html$ m/index\.php\?mod=information&id=$1
RewriteRule ^(?!store|space)(.+)/$ m/index\.php\?mod=category&catid=$1


#下面这行是分类/信息:标准伪静态名,不需要增加:#注释掉,与9,10行要对应
#RewriteRule ^category-([^\/]+)\.html$ category\.php\?CAtid=$1
#RewriteRule ^information-id-([0-9]+)\.html$ information\.php\?id=$1

RewriteRule ^news\.html$ news\.php
RewriteRule ^news-id-([0-9]+)\.html$ news\.php\?id=$1
RewriteRule ^news-catid-([0-9]+)\.html$ news\.php\?catid=$1
RewriteRule ^news-catid-([0-9]+)-page-([0-9]+)\.html$ news\.php\?catid=$1&page=$2
RewriteRule ^goods\.html$ goods\.php
RewriteRule ^goods-id-([0-9]+)\.html$ goods\.php\?id=$1
RewriteRule ^goods-([^\/]+)\.html$ goods\.php\?Catid=$1
RewriteRule ^corporation\.html$ corporation\.php
RewriteRule ^corporation-([^\/]+)\.html$ corporation\.php\?Catid=$1
RewriteRule ^aboutus\.html$ about\.php\?part=aboutus
RewriteRule ^sitemap\.html$ about\.php\?part=sitemap
RewriteRule ^aboutus-id-([0-9]+)\.html$ about\.php\?part=aboutus&id=$1
RewriteRule ^announce\.html$ about\.php\?part=announce&id=$1
RewriteRule ^faq\.html$ about\.php\?part=faq
RewriteRule ^faq-id-([0-9]+)\.html$ about\.php\?part=faq&id=$1
RewriteRule ^friendlink\.html$ about\.php\?part=friendlink

用户评论(8)
  • linziqu

    linziqu 2020-05-29 12:22:17

    手机版内容页规则:

    RewriteRule ^m/([^\/]+)/([0-9]+)\.html$ m/index\.php\?mod=information&id=$2

  • linziqu

    linziqu 2020-05-29 12:25:13

    手机版about页规则:

    RewriteRule ^m/aboutus-id-([0-9]+)\.html$ m/index\.php\?mod=aboutus&id=$1

  • linziqu

    linziqu 2020-05-29 13:07:46

    #corp

    RewriteRule ^m/corporation-([^\/]+)\.html$ m/index\.php\?mod=corp&catid=$2

    #good

    RewriteRule ^m/goods-id-([0-9]+)\.html$ m/index\.php\?mod=good&id=$1

    RewriteRule ^m/goods-([^\/]+)\.html$ m/index\.php\?mod=goods&Catid=$1

    #news

    RewriteRule ^m/news-catid-([0-9]+)\.html$ m/index\.php\?mod=news&catid=$1

    RewriteRule ^m/news-id-([0-9]+)\.html$ m/index\.php\?mod=news&id=$1

    RewriteRule ^m/news-catid-([0-9]+)-page-([0-9]+)\.html$ m/index\.php\?mod=news&catid=$1&page=$2

    #announce

    RewriteRule ^m/announce-id-([0-9]+)\.html$ m/index\.php\?mod=announce&id=$1

  • linziqu

    linziqu 2020-05-29 13:48:30

    现在只有手机版列表页的伪静态没改好,大神们 可以分享下吗?

  • linziqu

    linziqu 2020-05-29 13:51:11

    RewriteRule ^m/([^\/]+)/([0-9]+)\.html$ m/index\.php\?mod=category&catid=$1 这个哪里不对?

  • famelee

    famelee 2020-09-18 12:57:54

    支持一个

  • famelee

    famelee 2020-09-22 15:34:55

    你这个是apche的吧

    不是nginx的

  • canglong007

    canglong007 2022-05-25 10:04:14

    能分享下5.9的伪静态吗?单城市的。谢谢!

    linziqu

    手机版内容页规则:

    RewriteRule ^m/([^\/]+)/([0-9]+)\.html$ m/index\.php\?mod=information&id=$2