• 欢迎访问开心洋葱网站,在线教程,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站,欢迎加入开心洋葱 QQ群
  • 为方便开心洋葱网用户,开心洋葱官网已经开启复制功能!
  • 欢迎访问开心洋葱网站,手机也能访问哦~欢迎加入开心洋葱多维思维学习平台 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏开心洋葱吧~~~~~~~~~~~~~!
  • 由于近期流量激增,小站的ECS没能经的起亲们的访问,本站依然没有盈利,如果各位看如果觉着文字不错,还请看官给小站打个赏~~~~~~~~~~~~~!

PHPCMSv9 企业黄页 URL静态化apache iis设置

实用教程 开心洋葱 2882次浏览 0个评论

PHPCMSv9 企业黄页 URL静态化  phpcms企业黄页伪静态规则
 

PHPCMSv9 企业黄页 URL静态化apache iis设置

Apache Web Server:

.htaccess文件

RewriteRule ^qiyetuiguang.html index.php?m=yp&c=index&a=init
RewriteRule ^qiyetuiguang-([a-z]+)-([0-9]+).html index.php?m=yp&c=index&a=model&modelid=$2
RewriteRule ^qiyetuiguang-list-([0-9]+)-(.*)-(.*)-(.*)-(.*)-([0-9]+).html   index.php?m=yp&c=index&a=lists&modelid=$1&areaid=$2&catid=$3&price=$4&page=$5
RewriteRule ^qiyetuiguang-list-([0-9]+)-(.*)-(.*)-(.*)-(.*)-(.*)-([0-9]+).html   index.php?m=yp&c=index&a=lists&modelid=$1&areaid=$2&catid=$3&price=$4&tid=$5&page=$6
RewriteRule ^qiyetuiguang-show-([0-9]+)-([0-9]+).html index.php?m=yp&c=index&a=show&catid=$1&id=$2


RewriteRule ^web-([0-9]+).html index.php?m=yp&c=com_index&a=init&userid=$1
RewriteRule ^web-(.*)-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*).html index.php?m=yp&c=com_index&a=$1&modelid=$2&catid=$3&id=$4&userid=$5&page=$6
RewriteRule ^web-(.*)-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*).html index.php?m=yp&c=com_index&a=$1&modelid=$2&catid=$3&id=$4&tid=$5&userid=$6&page=$7

RewriteRule ^qiyetuiguang-company-1.html index.php?m=yp&c=index&a=company

IIS Web Server:

httpd.ini文件

 RewriteEngine on
RewriteRule ^(.*)/qiyetuiguang\.html\?*(.*)$ $1/index\.php\?m=yp&c=index&a=init
RewriteRule ^(.*)/qiyetuiguang\-([a-z]+)\-([0-9]+)\.html\?*(.*)$ $1/index\.php\?m=yp&c=index&a=model&modelid=$3
RewriteRule ^(.*)/qiyetuiguang\-list\-([0-9]+)\-(.*)\-(.*)\-(.*)\-(.*)\-([0-9]+)\.html\?*(.*)$   $1/index\.php\?m=yp&c=index&a=lists&modelid=$2&areaid=$3&catid=$4&price=$5&page=$5
RewriteRule ^(.*)/qiyetuiguang\-list\-([0-9]+)\-(.*)\-(.*)\-(.*)\-(.*)\-(.*)\-([0-9]+)\.html\?*(.*)$   $1/index\.php\?m=yp&c=index&a=lists&modelid=$2&areaid=$3&catid=$4&price=$5&tid=$6&page=$6
RewriteRule ^(.*)/qiyetuiguang\-show\-([0-9]+)\-([0-9]+)\.html\?*(.*)$ $1/index\.php\?m=yp&c=index&a=show&catid=$2&id=$3
RewriteRule ^(.*)/web\-([0-9]+)\.html\?*(.*)$ $1/index\.php\?m=yp&c=com_index&a=init&userid=$2
RewriteRule ^(.*)/web\-(.*)\-([0-9]*)\-([0-9]*)\-([0-9]*)\-([0-9]*)\-([0-9]*)\.html\?*(.*)$ $1/index\.php\?m=yp&c=com_index&a=$2&modelid=$3&catid=$4&id=$5&userid=$6&page=$7
RewriteRule ^(.*)/web\-(.*)\-([0-9]*)\-([0-9]*)\-([0-9]*)\-([0-9]*)\-([0-9]*)\-([0-9]*)\.html\?*(.*)$ $1/index\.php\?m=yp&c=com_index&a=$2&modelid=$3&catid=$4&id=$5&tid=$6&userid=$7&page=$8

 

注意 该URL规则适用与apache,如果您的web服务器为IIS,Nginx等,可以根据该规则做适当修改即可。APACHE默认不支持9个以上rewrite参数,以上规则已经将yp改为qiyetuiguang,如果不知道改代码的可以将qiyetuiguang改回为yp


开心洋葱 , 版权所有丨如未注明 , 均为原创丨未经授权请勿修改 , 转载请注明PHPCMSv9 企业黄页 URL静态化apache iis设置
喜欢 (0)

您必须 登录 才能发表评论!

加载中……