Home > Article > Backend Development > Code to realize static transformation of dedecms whole-site URL_PHP tutorial
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