<?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>奔向远方 &#187; URL静态化</title>
	<atom:link href="http://www.tisswb.com/archives/tag/url%e9%9d%99%e6%80%81%e5%8c%96/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tisswb.com</link>
	<description>结婚开始倒计时了，高兴~</description>
	<lastBuildDate>Tue, 19 Jul 2011 09:30:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>discuz 伪静态开启需要注意的地方</title>
		<link>http://www.tisswb.com/archives/289.html</link>
		<comments>http://www.tisswb.com/archives/289.html#comments</comments>
		<pubDate>Sun, 15 Mar 2009 16:38:42 +0000</pubDate>
		<dc:creator>笨二十一</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Web服务器]]></category>
		<category><![CDATA[服务器]]></category>
		<category><![CDATA[discuz]]></category>
		<category><![CDATA[URL静态化]]></category>

		<guid isPermaLink="false">http://www.tisswb.cn/?p=289</guid>
		<description><![CDATA[discuz的安装说明里虽然已经有很详细的设置伪静态的方法。有很多人按照官方的设置，还是不能顺利开启伪静态化。其实原因是多方面的，今天我就遇到了一个这样的问题，最后解决了这个问题，现在给大家总结一下后台开启伪静态失败后检查的主要步骤与解决方法：
1.按照官方的说明文件，开启服务器的rewrite功能或者与服务商联系开启一些必要的功能。这些可以详细查阅官方说明文件，再此略过。
2.如果按照说明无法开启伪静态一般有两种结果：第一种、无法打开列表页，这种应该是重写规则没有设置到正确的位置；第二种、开启完全无效，还是完全的动态地址，这种情况一般是使用了其他的模板风格或者修改模板造成的，解决方法很简单，就是在模板的footer.html里面body里面添加{eval output();}，这个是discuz控制重写的一个必须的部分。因此，在开启伪静态的时候，最好先切换的默认的模板，看看是否已经成功，如果成功就能确定是新模板的问题了。
]]></description>
			<content:encoded><![CDATA[<p>discuz的安装说明里虽然已经有很详细的设置伪静态的方法。有很多人按照官方的设置，还是不能顺利开启伪静态化。其实原因是多方面的，今天我就遇到了一个这样的问题，最后解决了这个问题，现在给大家总结一下后台开启伪静态失败后检查的主要步骤与解决方法：</p>
<p>1.按照官方的说明文件，开启服务器的rewrite功能或者与服务商联系开启一些必要的功能。这些可以详细查阅官方说明文件，再此略过。</p>
<p>2.如果按照说明无法开启伪静态一般有两种结果：第一种、无法打开列表页，这种应该是重写规则没有设置到正确的位置；第二种、开启完全无效，还是完全的动态地址，这种情况一般是使用了其他的模板风格或者修改模板造成的，解决方法很简单，就是在模板的footer.html里面body里面添加{eval output();}，这个是discuz控制重写的一个必须的部分。因此，在开启伪静态的时候，最好先切换的默认的模板，看看是否已经成功，如果成功就能确定是新模板的问题了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tisswb.com/archives/289.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>多种环境下discuz6.x首页静态化的方法</title>
		<link>http://www.tisswb.com/archives/59.html</link>
		<comments>http://www.tisswb.com/archives/59.html#comments</comments>
		<pubDate>Mon, 02 Jun 2008 01:35:15 +0000</pubDate>
		<dc:creator>笨二十一</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web技术]]></category>
		<category><![CDATA[discuz]]></category>
		<category><![CDATA[URL静态化]]></category>

		<guid isPermaLink="false">http://www.tisswb.cn/?p=59</guid>
		<description><![CDATA[discuz6.x的url静态化，一般都是处理的列表页和内容也的静态化，有很多时候，为了达到浏览的速度快，我们必须把首页也同时静态化了，这样访问起来比较方便，下面就介绍一下不同环境下discuz的首页静态化的方法：
1.修改服务器配置文件:
独立主机用户:
打开 Apache 所在目录里的 conf/httpd.conf,添加:
RewriteRule ^(.*)/index.html$ $1/index.php
RewriteRule ^(.*)/index-([0-9]+).html$ $1/index.php?gid=$2
Apache Web Server (虚拟主机用户):
打开 .htaccess 文件,添加:
RewriteRule ^index.html$ index.php
RewriteRule ^index-([0-9]+).html$ index.php?gid=$1
<span class="readmore"><a href="http://www.tisswb.com/archives/59.html" title="多种环境下discuz6.x首页静态化的方法" target="_blank">阅读全文——共1118字</a></span>]]></description>
			<content:encoded><![CDATA[<p>discuz6.x的url静态化，一般都是处理的列表页和内容也的静态化，有很多时候，为了达到浏览的速度快，我们必须把首页也同时静态化了，这样访问起来比较方便，下面就介绍一下不同环境下discuz的首页静态化的方法：</p>
<p><strong>1.修改服务器配置文件:</strong></p>
<p><strong>独立主机用户:</strong><br />
打开 Apache 所在目录里的 conf/httpd.conf,添加:</p>
<blockquote><p>RewriteRule ^(.*)/index.html$ $1/index.php<br />
RewriteRule ^(.*)/index-([0-9]+).html$ $1/index.php?gid=$2</p></blockquote>
<p>Apache Web Server (虚拟主机用户):<br />
打开 .htaccess 文件,添加:</p>
<blockquote><p>RewriteRule ^index.html$ index.php<br />
RewriteRule ^index-([0-9]+).html$ index.php?gid=$1</p></blockquote>
<p><strong>IIS Web Server（独立主机用户）:</strong><br />
打开筛选器 Rewrite, 配置它的 httpd.ini 文件,添加:</p>
<blockquote><p>RewriteRule ^(.*)/index.html?*(.*)$ $1/index.php?$2<br />
RewriteRule ^(.*)/index-([0-9]+).html?*(.*)$ $1/index.php?gid=$2&amp;$3</p></blockquote>
<p><strong>2.修改 include/global.func.php 文件</strong></p>
<p> 查找:</p>
<blockquote><p>if($rewritestatus &amp; 1)</p></blockquote>
<p>上面添加:</p>
<p>复制内容到剪贴板</p>
<blockquote><p>$indexhtml = 1; //1开启首页静态化，0关闭首页静态化<br />
$gidhtml = 1; //1开启首页静态化，0关闭首页静态化<br />
if($indexhtml == 1) {<br />
        $searcharray[] = &#8220;/&lt;a href=&#8221;index.php&#8221;([^&gt;]*)&gt;/e&#8221;;<br />
        $replacearray[] = &#8220;rewrite_index(&#8216;\1&#8242;)&#8221;;<br />
}<br />
if($gidhtml == 1) {<br />
        $searcharray[] = &#8220;/&lt;a href=&#8221;index.php?gid=(d+)&#8221;([^&gt;]*)&gt;/e&#8221;;<br />
        $replacearray[] = &#8220;rewrite_index(&#8216;\2&#8242;, &#8216;\1&#8242;)&#8221;;<br />
}</p></blockquote>
<p>再找:</p>
<blockquote><p>function rewrite_thread($tid, $page = 0, $prevpage = 0, $extra = &#8221;)</p></blockquote>
<p>上面添加:</p>
<blockquote><p>function rewrite_index($extra = &#8221;, $gid = 0) {<br />
        return &#8216;&lt;a href=&#8221;index&#8217;.($gid ? &#8216;-&#8217;.$gid : &#8221;).&#8217;.html&#8221;&#8216;.stripslashes($extra).&#8217;&gt;&#8217;;<br />
}</p></blockquote>
<p>保存文件,上传覆盖.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tisswb.com/archives/59.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 6.06+LAMP+discuz6.0 启用URL静态化配置</title>
		<link>http://www.tisswb.com/archives/32.html</link>
		<comments>http://www.tisswb.com/archives/32.html#comments</comments>
		<pubDate>Thu, 24 Apr 2008 04:29:53 +0000</pubDate>
		<dc:creator>笨二十一</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[服务器]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[URL静态化]]></category>
		<category><![CDATA[虚拟主机]]></category>

		<guid isPermaLink="false">http://www.tisswb.cn/?p=32</guid>
		<description><![CDATA[安装discuz6.0后，启用URL静态化的步骤（本人使用的是apache的虚拟主机）：
1。由于ubuntu6.06中使用apt安装的apache默认不启用mod_rewrite 模块，需要启用：
命令：sudo a2enmod rewrite
之后在/etc/apache2/mods-enabled下面已有rewrite.load文件就可以看到
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
2。在/etc/apache2/sites-enabled中编辑需要打开的虚拟主机文件，
示例如下：
&#60;VirtualHost *:80&#62;
    ServerAdmin noname@gmail.com
    DocumentRoot /www/html/scripts
<span class="readmore"><a href="http://www.tisswb.com/archives/32.html" title="ubuntu 6.06+LAMP+discuz6.0 启用URL静态化配置" target="_blank">阅读全文——共983字</a></span>]]></description>
			<content:encoded><![CDATA[<p>安装discuz6.0后，启用URL静态化的步骤（本人使用的是apache的虚拟主机）：</p>
<p>1。由于ubuntu6.06中使用apt安装的apache默认不启用mod_rewrite 模块，需要启用：</p>
<p>命令：sudo a2enmod rewrite</p>
<p>之后在/etc/apache2/mods-enabled下面已有rewrite.load文件就可以看到</p>
<p>LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so</p>
<p>2。在/etc/apache2/sites-enabled中编辑需要打开的虚拟主机文件，</p>
<p><span style="font-family: Courier New;">示例如下：</span></p>
<p><span style="font-family: Courier New;">&lt;VirtualHost *:80&gt;<br />
    ServerAdmin </span><a href="mailto:noname@gmail.com" target="_blank"><span style="font-family: Courier New;">noname@gmail.com</span></a><br />
<span style="font-family: Courier New;">    DocumentRoot /www/html/scripts<br />
    ServerName scripts.zeali.net<br />
    ErrorLog /logs/scripts.zeali.net-error_log<br />
    CustomLog /logs/scripts.zeali.net-access_log common<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteRule ^(.*)/archiver/((fid|tid)-[w-]+.html)$ $1/archiver/index.php?$2<br />
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html$ $1/forumdisplay.php?fid=$2&amp;page=$3<br />
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/viewthread.php?tid=$2&amp;extra=page%3D$4&amp;page=$3<br />
RewriteRule ^(.*)/space-(username|uid)-(.+).html$ $1/space.php?$2=$3<br />
RewriteRule ^(.*)/tag-(.+).html$ $1/tag.php?name=$2<br />
&lt;/IfModule&gt;<br />
&lt;/VirtualHost&gt;</span></p>
<p><span style="font-family: Courier New;">3。激活这个虚拟主机设置</span></p>
<p><span style="font-family: Courier New;">命令：sudo a2ensite xxx</span></p>
<p><span style="font-family: Courier New;">4。重启apache</span></p>
<p><span style="font-family: Courier New;">这时候，discuz的静态化已经可以使用了~</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tisswb.com/archives/32.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

