JAVA、PHP、前端、APP、网站开发 - 开发技术学习

开发技术学习 » 编程开发 » 记Destoon伪静态配置

记Destoon伪静态配置

此文被围观2658 日期: 2012-04-09 分类 : 编程开发  标签:  ···

以前按官方的方法去做,开启rewrite_module,然后加一串代码

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

注:RewriteBase /这里要出错,所以我给注释了

还要修改一个地方就是:
允许在任何目录中使用“.htaccess”文件,将“AllowOverride”改成“All”(默认为“None”):
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All

参考资料:http://www.cnblogs.com/njcdh/articles/1772011.html

http://help.destoon.com/skill/10.html


站点声明:部分内容源自互联网,为传播信息之用,如有侵权,请联系我们删除。

© Copyright 2011-2024 www.kfju.com. All Rights Reserved.
超级字帖 版权所有。 蜀ICP备12031064号      川公网安备51162302000234