Home >Backend Development >PHP Tutorial >dedecms template code to realize the static transformation of dedecms whole-site URL

dedecms template code to realize the static transformation of dedecms whole-site URL

WBOY
WBOYOriginal
2016-07-29 08:36:531025browse

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.

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