Phpcms Open Pseudo-static method is very simple, on-line tutorials especially. First, the mobile version of the domain binding to space, and then in the Phpcms module inside the background to open the mobile phone portal, the mobile domain name to fill in
Open/phpcms/modules/wap/functions/global.func.php
Find the two functions inside and comment out the code shown in the Red section, adding the code below the comment.
function list_url ($typeid) { #return wap_siteurl. " &a=lists&typeid= $typeid "; return "/list-$typeid ". HTML ';} Function show_url ($catid, $id, $typeid = ") {global $WAP; if ($typeid = =") { $types = getcache (' Wap_type ', ' WAP '); foreach ($types as $type) { if ($type [' Cat ']== $catid) { $typeid = $type [' typeid ']; break; } }} #return wap_siteurl. " &a=show&catid= $catid &typeid= $typeid &id= $id "; return "/show-$catid-$typeid-$id". HTML ';}
add pseudo-static rules, here I use the Nginx rules, if you use different, please control the changes.
rewrite ^/list-([0-9]+) .html/index.php?&a=lists&typeid=$1;
rewrite ^/show-([0-9]+)-([0-9]+)-([0-9]+] .html/index.php?a=show&catid=$1&typeid=$2&id=$3;
The final URL is http://m.xx.com/list-1.html,http://m.xx.com/show-23-7-151.html, which allows you to preview the effect using your phone's input www.xinchaoyue.com/. Mobile version of the site modified half a day also made the template to make a mobile adaptation version of the template to modify the location of the templates directory under the WAP directory. But feel Phpcms Mobile station function is a bit too shabby, not too convenient to do the PC mobile URL one by one corresponding jump.
PHPCMS WAP Mobile Station pseudo static method Nginx