How to optimize Imperial cms website to make tags pseudo-static?
This article will explain in detail how to optimize the Imperial cms website to make tags pseudo-static. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
The steps to implement the pseudo-static optimization value of Imperial cms website tags are as follows:
1. Modify the sys_eShowTags function in e/class/t_functions.php
The code is as follows:
/ display TAGSfunction sys_eShowTags ($cid,$num=0,$line=0,$order='',$isgood='',$isgoodshow='',$showjg='',$shownum=0,$cs='') {global $empire,$dbtbpre,$public_r,$navinfor;$str='';if (empty ($showjg)) {$showjg='';} $ln=0;if ($cid=='selfinfo') {if (empty ($navinfor ['infotags'])) {return';} $jg='';$r=explode (',', $navinfor ['infotags']); $count=count ($r); for ($iTun0) $iquery ("select tagid,tagname,num,isgood from {$dbtbpre} enewstags". $where. " Order by ". $order.$limit); while ($ringing empires-> fetch ($sql)) {if ($shownum) {$snum=' ('. $r [num].)';} $font1='';$font2='';if ($isgoodshow&&$ r [num]) {$font1=$gfont1;$font2=$gfont2;} $ln++;$br='';if ($line) {if ($ln%$line==0) {$br='';} / / $str.=$jg.''.$font1.$ r [tagname]. $snum.$font2.''.$br $str.=$jg.''.$font1.$ r [tagname]. $snum.$font2.''.$br;$jg=$br?'':$showjg;}} echo $str
}
Recommended to learn the Imperial cms course
two。 Add .htaccess file to the root of the website, as follows
The code is as follows:
RewriteEngine OnRewriteBase / RewriteRule tag/ (. *). Html$ e/tags/?tagname=$1RewriteRule e/tags/ (. *). Html$ e/tags/?tagid=$1
We also need space to support pseudo-static.
1. Check whether Apache supports mod_rewrite to check the environment configuration through the phpinfo () function provided by php. Find "Loaded Modules" through Ctrl+F, which lists all the modules that have been enabled by apache2handler. If "mod_rewrite" is included, it is already supported, and you no longer need to continue to set it.
If "mod_rewrite" is not opened, open the httpd.conf file under your apache installation directory "/ apache/conf/", find "LoadModule rewrite_module" through Ctrl+F, and delete the previous "#" sign.
If it is not found, go to the "LoadModule" area, add "LoadModule rewrite_module modules/mod_rewrite.so" on the last line (an exclusive line is required), and then restart the apache server.
two。 Let the apache server support .htaccess
Modify the httpd.conf file
The code is as follows:
Options FollowSymLinksAllowOverride None
Change to
The code is as follows:
Options FollowSymLinksAllowOverride All on the Imperial cms website optimization to make tags pseudo-static how to share here, I hope the above content can be of some help to everyone, can learn more knowledge. If you think the article is good, you can share it for more people to see.