当前位置:首页 > CMS教程 > Destoon > 列表

destoon 伪静态

发布:smiling 来源: PHP粉丝网  添加日期:2014-06-10 16:17:11 浏览: 评论:0 

Destoon 程序伪静态设置方法,对于Destoon 程序的相关伪静态规则,官方的用了两次(Nginx环境和Apache环境),都会造成不同的错误,最后在论坛找到了解决办法,昨天一位朋友也问过关于伪静态规则的相关问题,下面说明Nginx和Apache两种环境中的不同设置和相关的规则.

Destoon 程序在Nginx环境下的伪静态设置方法

Destoon 程序后台设置

Nginx环境下的伪静态规则:

  1. rewrite ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php; 
  2. rewrite ^(.*)-htm-(.*)$ $1.php?$2; 
  3. rewrite ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show.php?itemid=$2&page=$4; 
  4. rewrite ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list.php?catid=$2&page=$4; 
  5. rewrite ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3; 
  6. rewrite ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3; 
  7. rewrite ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3; 
  8. rewrite ^(.*)/com/([a-z0-9]+)/([a-z]+)/(.*)\.html$ $1/company/$3/index.php?homepage=$2&rewrite=$4; 
  9. rewrite ^(.*)/com/([a-z0-9]+)/([a-z]+)([/])?$ $1/company/$3/index.php?homepage=$2; 
  10. rewrite ^(.*)/com/([a-z0-9]+)([/])?$ $1/company/index.php?homepage=$2; 
  11. rewrite ^([a-z0-9]+)\.co([/])?$ company/index.php?homepage=$1; 
  12. rewrite ^([a-z0-9]+)\.co/(.*)$ company/index.php?homepage=$1&rewrite=$2; 
  13. rewrite ^(htm)/(.*)$ index.php?&rewrite=$2; 

Destoon 程序在Apache环境下的伪静态设置方法

Destoon 程序后台设置

Apache环境下的伪静态规则:

  1. # Destoon B2B Rewrite Rules 
  2. ErrorDocument 404 /404.php 
  3. RewriteEngine On 
  4. RewriteBase / 
  5. RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404.php 
  6. RewriteRule ^(.*)-htm-(.*)$ $1.php?$2 
  7. RewriteRule ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show.php?itemid=$2&page=$4 
  8. RewriteRule ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list.php?catid=$2&page=$4 
  9. RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show.php?itemid=$2&page=$3 
  10. RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list.php?catid=$2&page=$3 
  11. RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index.php?rewrite=$3 
  12. RewriteRule ^(com)/([a-z0-9]+)/([a-z]+)/(.*)\.html$ index.php?homepage=$2&file=$3&rewrite=$4 
  13. RewriteRule ^(com)/([a-z0-9]+)/([a-z]+)([/])?$ index.php?homepage=$2&file=$3 
  14. RewriteRule ^(com)/([a-z0-9]+)([/])?$ index.php?homepage=$2 

相关说明:这两种环境下我设置的伪静态后URL形式不一样,你可以选择自己喜欢的URL样式,如果在设置过程中有什么问题,可以留言.

补充:刚刚看了一下,为避免直接复制粘贴造成字符错误,从而浪费你的时间,这里可以直接下载伪静态规则,两种环境的都在里面.

Tags: destoon 伪静态

分享到: