Home >Backend Development >PHP Tutorial >dedecms template code to realize the static transformation of dedecms whole-site URL
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 to -1, which is 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
The above introduces the code of dedecms template to realize the static transformation of dedecms whole-site URL, including the content of dedecms template. I hope it will be helpful to friends who are interested in PHP tutorials.