In order to prove dedecms5.7 support article pseudo static we just open/include/helpers/channelunit.helper.php
The code is as follows |
Copy Code |
Dynamic articles if ($cfg _rewrite = = ' Y ') { return $GLOBALS ["Cfg_plus_dir"]. " /view-". $aid. ' -1.html '; } |
There is a sentence above is $cfg_rewrite = = ' Y ' means to open the pseudo static settings on it, then dedecms5.7 pseudo static settings where we enter the back.
background-System Parameters-core settings-whether to use pseudo static: select "Yes";
All right, now you're creating a home page and a list of pages, when you publish an article Select Dynamic page you will find that the page is pseudo static, but not open, this is right, we also need to configure htaccess or Apache pseudo static rules, this simple
Htaccess or Apache rules are the same at your site add a sentence
The code is as follows |
Copy Code |
Rewriteengine on rewriterule/plus/view-([0-9]+) -1\.html$/plus/view.php?arcid=$1 rewriterule/plus/view-([0-9]+)-([0-9]+) \.html$/plus/view.php?aid=$1&pageno=$2 |
Restart Apache for normal use
Question one, if an article before configuring what we are going to do with previous articles, this simple SQL command in the DEDECMS background executes
Set all documents to "dynamic browsing only":
Update dede_archives Set Ismake=-1
Set all columns to use dynamic page:
Update Dede_arctype Set Isdefault=-1
Problem two, in order to facilitate we can modify the Dedecms after the release file module file static settings can be, specifically as follows
Find background files:/dede/templets/article_add.htm changes the default "dynamic browsing only" when adding articles
The code is as follows |
Copy Code |
<TD width= > Release Options:</td> <TD width= "379" ><input name= "ishtml" type= "Radio" class= "NP" value= "1" checked= "1"/> Generate HTML <input type= "Radio" name= "ishtml" class= "NP" value= "0"/> only dynamic browsing </td> Change to the following code <TD width= > Release Options:</td> <TD width= "379" ><input name= "ishtml" type= "Radio" class= "NP" value= "1"/> Generate HTML <input type= "Radio" name= "ishtml" class= "NP" value= "0" checked= "1"/> Only dynamic browsing </td> |
All right, that's it. About DEDECMS Details page pseudo static settings all introduced, very simple.