


Sharing Empire cms website optimization method to make tags pseudo-static
帝国cms网站优化值tags伪静态的实现步骤如下:
1.修改e/class/t_functions.php中的sys_eShowTags函数
代码如下:
//显示TAGS function 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($i=0;$i<$count;$i++) { $ln++; $br=''; if($line) { if($ln%$line==0) { $br=' '; } } $str.=$jg.'<a href="'.$public_r[newsurl].'e/tags/?tagname='.urlencode($r[$i]).$cs.'" target="_blank">'.$r[$i].'</a>' .$br; $jg=$br?'':$showjg; } } else { $and=''; $where=''; if($cid) { $where=strstr($cid,',')?"cid in ($cid)":"cid='$cid'"; $and=' and '; } if($isgood) { $where.=$and.'isgood=1'; } if($where) { $where=' where '.$where; } $order=$order?' '.$order:' tagid desc'; $limit=''; if($num) { $limit=' limit '.$num; } //推荐标红 $gfont1=''; $gfont2=''; if($isgoodshow) { if(strstr($isgoodshow,'r')) { $gfont1='<font color="red">'; $gfont2='</font>'; } if(strstr($isgoodshow,'s')) { $gfont1=$gfont1.''; $gfont2=''.$gfont2; } } $jg=''; $snum=''; $sql=$empire->query("select tagid,tagname,num,isgood from {$dbtbpre}enewstags".$where." order by".$order. $limit); while($r=$empire->fetch($sql)) { if($shownum) { $snum='('.$r[num].')'; } $font1=''; $font2=''; if($isgoodshow&&$r[isgood]) { $font1=$gfont1; $font2=$gfont2; } $ln++; $br=''; if($line) { if($ln%$line==0) { $br=' '; } } //$str.=$jg.'<a href="'.$public_r[newsurl].'e/tags/?tagid='.$r[tagid].$cs.'" target="_blank">'.$font1.$r[tagname]. $snum.$font2.'</a>'.$br; $str.=$jg.'<a href="'.$public_r[newsurl].'e/tags/'.$r[tagid].'.html" target="_blank">'.$font1.$r[tagname].$snum. $font2.'</a>'.$br; $jg=$br?'':$showjg; } } echo $str;
}
推荐学习《帝国cms教程》
2.网站根目录 增加.htaccess文件,内容如下
代码如下:
RewriteEngine On RewriteBase / RewriteRule tag/(.*).html$ e/tags/?tagname=$1 RewriteRule e/tags/(.*).html$ e/tags/?tagid=$1
还要空间支持伪静态
1.检测Apache是否支持mod_rewrite 通过php提供的phpinfo()函数查看环境配置,通过Ctrl+F查找到“Loaded Modules”,其中列出了所有apache2handler已经开启的模块,如果里面包括“mod_rewrite”,则已经支持,不再需要继续设置。
如果没有开启“mod_rewrite”,则打开目录 您的apache安装目录“/apache/conf/” 下的 httpd.conf 文件,通过Ctrl+F查找到“LoadModule rewrite_module”,将前面的”#”号删除即可。
如果没有查找到,则到“LoadModule” 区域,在最后一行加入“LoadModule rewrite_module modules/mod_rewrite.so”(必选独占一行),然后重启apache服务器即可。
2.让apache服务器支持.htaccess
修改httpd.conf文件
代码如下:
Options FollowSymLinks AllowOverride None
改为
代码如下:
Options FollowSymLinks AllowOverride All
The above is the detailed content of Sharing Empire cms website optimization method to make tags pseudo-static. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The Empire CMS sitemap can be found by accessing the config.inc.php file and checking the dositemap settings. If set to "on", sitemap is enabled. The sitemap path is located in the sitemapurl setting and can be accessed via a browser or downloaded via FTP.

The mobile settings of Empire CMS are located in the "Mobile Template" of the "Template Management" module. The specific steps include: enabling the template, selecting the application channel, editing the template content, and saving the settings.

Empire CMS template download location: Official template download: https://www.phome.net/template/ Third-party template website: https://www.dedecms.com/diy/https://www.0978.com.cn /https://www.jiaocheng.com/Installation method: Download template Unzip template Upload template Select template

The Imperial CMS database configuration file is located in the website root directory e/config/db.inc.php. It contains the following configuration information: $dbhost: database server address $dbuser: database user name $dbpass: database password $dbname: database name $dbport :Database port $dbcharset: Database character set

The ideal location for the Empire CMS template file is /e/template/default/skin/default/. Secondly, it can also be placed in /e/data/skins/ and /e/skin/. You need to pay attention to maintaining the folder structure and setting file permissions. and regular backups.

Yes, Empire CMS is a free and open source content management system (CMS). It is a lightweight CMS that is feature-rich and easy to use. Empire CMS is licensed under the GNU General Public License (GPL), which means it is free to download, install and use. For commercial use, it offers a paid version that offers additional features and support such as ad management, online payments, and premium technical support.

The automatic publishing interface of Empire CMS is located at /e/api/web/postinfo.php. The usage steps are as follows: visit /e/api/web/postinfo.php address and use HTTP POST to submit the article title, column ID, category ID, author and article The content and other data interfaces will return a response in JSON format, which contains the publishing results and article ID.

The Imperial CMS Member Center is located in the "Member Management" menu in the background or at the following URL: Browser side: https://your domain name/e/member/user.php Server side: /e/member/user.php Functions included in the Member Center Including member management, member group management, personal center, points management, level management, etc., to facilitate administrators and members to manage website account information.
