<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>伪静态 &#8211; 科技改变生活-雨落星辰</title>
	<atom:link href="https://p1e.cn/html/tag/%E4%BC%AA%E9%9D%99%E6%80%81/feed" rel="self" type="application/rss+xml" />
	<link>https://p1e.cn</link>
	<description>所有的伟大,都源于一个勇敢的开始</description>
	<lastBuildDate>Thu, 23 May 2019 00:45:32 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>dedecms全站伪静态的实现方法及注意事项</title>
		<link>https://p1e.cn/html/542.html</link>
					<comments>https://p1e.cn/html/542.html#respond</comments>
		
		<dc:creator><![CDATA[Naoki]]></dc:creator>
		<pubDate>Thu, 11 Oct 2018 01:22:54 +0000</pubDate>
				<category><![CDATA[运维笔记]]></category>
		<category><![CDATA[dedecms]]></category>
		<category><![CDATA[伪静态]]></category>
		<guid isPermaLink="false">https://www.815494.com/?p=542</guid>

					<description><![CDATA[开启伪静态的前提条件 保证你的空间或服务器支持伪静态即URL重写 开启DedeCms伪静态 开启伪静态的方法：后台&#8211;》系统&#8211;》核心设置 找到：是否使用伪静态： 选择是 确定保存。 栏目和文章发布设置 栏目列表选项： 选择使用动态页 发布选项： 选择仅动态浏览 DEDECMS全站伪静态方法 首页伪静态 把站点根目录下index.html删除，以后不更新主页HTML即可，当然你也可以选择不使用动态首页。 频道、列表、文章伪静态 主要通过修改GetFileName()、GetTypeUrl()这两]]></description>
										<content:encoded><![CDATA[<p><strong>开启伪静态的前提条件</strong></p>
<p>保证你的空间或服务器支持伪静态即URL重写</p>
<p><strong>开启DedeCms伪静态</strong></p>
<p>开启伪静态的方法：后台&#8211;》系统&#8211;》核心设置 找到：是否使用伪静态： 选择是 确定保存。<br />
栏目和文章发布设置<br />
栏目列表选项： 选择使用动态页 发布选项： 选择仅动态浏览<br />
DEDECMS全站伪静态方法<br />
首页伪静态<br />
把站点根目录下index.html删除，以后不更新主页HTML即可，当然你也可以选择不使用动态首页。<br />
频道、列表、文章伪静态<br />
主要通过修改GetFileName()、GetTypeUrl()这两个函数实现。DedeCms V5.3、DedeCms V5.5和DedeCms V5.6版本，打开/include/channelunit.func.php进行修改。注意：DedeCms V5.7，此文件路径更改了，你打开/include/helpers/channelunit.helper.php即可。</p>
<p>查找<br />
[info]return $GLOBALS[&#8220;cfg_plus_dir&#8221;].&#8221;/view-&#8220;.$aid.&#8217;-1.html&#8217;; [/info]<br />
修改为<br />
[success]return &#8220;/view-&#8220;.$aid.&#8217;-1.html&#8217;; [/success]<br />
查找<br />
[info]return $GLOBALS[&#8216;cfg_phpurl&#8217;].&#8221;/view.php?aid=$aid&#8221;; [/info]<br />
修改为<br />
[success]return &#8220;/view.php?aid=$aid&#8221;;[/success]</p>
<p>其实不修改也可以，但是URL地址会长一点。这个是文章的。</p>
<p>查找<br />
[info]$reurl = $GLOBALS[&#8216;cfg_phpurl&#8217;].&#8221;/list.php?tid=&#8221;.$typeid; [/info]<br />
修改为<br />
[success]$reurl = &#8220;/list-&#8220;.$typeid.&#8221;.html&#8221;; [/success]</p>
<p>这个必须修改，是栏目页的。</p>
<p>Nginx伪静态规则</p>
<p>[code lang=&#8221;js&#8221;]location / {<br />
rewrite &#8220;^/list-([0-9]+).html$&#8221; /plus/list.php?tid=$1 last;<br />
rewrite &#8220;^/list-([0-9]+)-([0-9]+)-([0-9]+).html$&#8221; /plus/list.php?tid=$1&amp;totalresult=$2&amp;PageNo=$3 last;<br />
rewrite &#8220;^/view-([0-9]+)-1.html$&#8221; /plus/view.php?arcID=$1 last;<br />
rewrite &#8220;^/view-([0-9]+)-([0-9]+).html$&#8221; /plus/view.php?aid=$1&amp;pageno=$2 last;<br />
rewrite &#8220;^/tags.html$&#8221; /tags.php last;<br />
rewrite &#8220;^/tag-([0-9]+)-([0-9]+).html$&#8221; /tags.php?/$1/$2/ last;<br />
break;<br />
}<br />
[/code]</p>
<div></div>]]></content:encoded>
					
					<wfw:commentRss>https://p1e.cn/html/542.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
