一聚教程网:一个值得你收藏的教程网站

热门教程

phpcms v9中给Rss伪静态配置方法

时间:2022-06-25 16:26:40 编辑:袖梨 来源:一聚教程网

ss页面的伪静态实现目标
设置前的URL:http://localhost/index.php?m=content&c=rss&siteid=1
设置后的URL:http://localhost/rss.html

实现方法:

一、开启rewrite模块

找到Apache 配置文件 httpd.conf

 1、LoadModule rewrite_module modules/mod_rewrite.so

 把这句的“#”注释掉。

 2、AllowOverride none 改为 AllowOverride all

 注意,每次改动配置文件httpd.conf后,别忘了重启apache服务器。

二、添加url路由规则

在根目录的.htaccess文件(没有的话自己创建)添加如下代码:

 代码如下 复制代码

   RewriteRule ^rss.html index.php?m=content&c=rss&siteid=1
   RewriteEngine on
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
 

小结:这是没有分页的phpcms v9伪静态设置,不用在后台的扩展那里添加url规则,相对相对于需要分页的伪静态,要简单得多。在如何实现phpcms v9_4X版本tag的伪静态?  我发现有些网友问题很多,可能我日后会再来一篇phpcms v9伪静态的总结。

 

热门栏目