Home  >  Article  >  Backend Development  >  Code to realize static transformation of dedecms whole-site URL_PHP tutorial

Code to realize static transformation of dedecms whole-site URL_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:55:37762browse

Reprinted from bbs.dedecms.com
1. Copy include to the include directory in the website.
2. Modify the database
Set all documents to "dynamic only". You can enter the database management and execute the following command:
update dede_archives set ismake=-1
And set the default value of ismake -1 means dynamic.
Set all columns to "Use dynamic pages", you can enter the database management, execute the following command:
update dede_arctype set isdefault=-1
And set the default value of isdefault to -1, which is dynamic.
3. Add server rewrite rules. For Apache2, you can add the following at the end of the httpd.conf file:

RewriteRule ^(.*)/view-( [0-9]+).html$ $1/plus/view.php?aid=$2
RewriteRule ^(.*)/view-([0-9]+)-([0-9]+) .html$ $1/plus/view.php?aid=$2&pageno=$3
RewriteRule ^(.*)/list-([0-9]+).html$ $1/plus/list.php?tid= $2

4. After the adjustment is completed,
go to the DEDE background management program, update the homepage, and complete.
Local download

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318242.htmlTechArticleReprinted from bbs.dedecms.com 1. Copy include to the include directory in the website. 2. Modify the database. Set all documents to "dynamic only". You can enter the database management and execute the following command...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn