
Warning: Declaration of c2c_ConfigureSMTP::options_page_description() should be compatible with C2C_Plugin_023::options_page_description($localized_heading_text = '') in /home/mslandimfs1l6a8ndd/wwwroot/wp-content/plugins/configure-smtp/configure-smtp.php on line 47
<?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; Rewrite模块</title>
	<atom:link href="http://www.msland.cn/tag/rewrite%e6%a8%a1%e5%9d%97/feed" rel="self" type="application/rss+xml" />
	<link>http://www.msland.cn</link>
	<description>迷失的世界-终要找到归属....</description>
	<lastBuildDate>Sat, 24 Jan 2015 10:46:32 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>wordpress在win主机开启伪静态启用Rewrite模块</title>
		<link>http://www.msland.cn/wordpress-win-rewrite.html</link>
		<comments>http://www.msland.cn/wordpress-win-rewrite.html#comments</comments>
		<pubDate>Sat, 26 May 2012 17:07:19 +0000</pubDate>
		<dc:creator><![CDATA[Zero]]></dc:creator>
				<category><![CDATA[网站相关]]></category>
		<category><![CDATA[Rewrite模块]]></category>
		<category><![CDATA[win主机]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[伪静态]]></category>

		<guid isPermaLink="false">http://www.msland.cn/?p=371</guid>
		<description><![CDATA[伪静态通过【win主机 伪静态 】 最近使用wordpress建立了这个博客，首先国外的程序环境要求和国内的好 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>伪静态通过【win主机 伪静态 】</p>
<p>最近使用wordpress建立了这个博客，首先国外的程序环境要求和国内的好多差异，采用ISAPI_Rewrite后怎么也无法静态化，静态化成 功后网址中必须带有index.php，本来无法去掉也无所谓；当文章翻页的时候发现了问题，主页的分页到第二页第三页….都无法打开，原因是地址中 竟然多了一个index.php(例如：index.php/index.php/pag这样了，url完全错误了)，许多人说环境问题，无奈下开始考虑 重新来考虑静态问题，分析思路采用Discuz论坛哪种伪静态方式比较不错，那么为什么discuz可以，却在wordpress不可以呢，功夫不负有新 人，昨天晚上调试成功了，和大家分享一下。</p>
<p>首先你的服务器加载了ISAPI_Rewrite，Discuz如果您正在使用伪静态，那么就不要考虑再次加载了，在wordpress官方许多人提出了 需要单独加载专用的Rewrite，其实不需要，在国内的文章copy太严重了，找了一天，发现重复的起码有9.6成都同出一辄，没有一点正确性，不能使 用，无奈之下去国外搜索到后，建立了httpd.ini，网站成功完成了静态，永久链接规则也可以自行随意根据喜好设置，这是国内那些描述中还没有做到 的，本站就是采用的这个规则，在永久链接内也可以随意修改自己的喜好网址样式，同样seo目的也达到了，如果您在使用wordpress的时候还在被前边 描述的问题困扰，那么赶快行动吧。<br />
<strong>备注：</strong><br />
1、在你使用ISAPI_Rewrite后，无需再使用cos-html-cache静态生成插件，因为没有这个必要了。<br />
2、ISAPI_Rewrite国外网址：http://www.basilv.com/psd/blog/2 … dpress-20-under-iis<br />
<strong>规则如下：</strong></p>
<pre class="brush: php; title: ; notranslate"> [ISAPI_Rewrite]
# Defend your computer from some worm attacks
#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through
RewriteRule /software-files/(.*) /software-files/$1 [L]
RewriteRule /images/(.*) /images/$1 [L]
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]</pre>
<p><strong>安装说明：</strong><br />
1. 将Rewrite.dll拷贝到c:\Rewrite.dll（也可以拷贝到C:\WINDOWS目录内，位置根据喜好可以自由放置）;<br />
2. 在IIS的Isapi上添加这个筛选器, 筛选器名称Rewrite,可执行文件选择Rewrite.dll;<br />
3. 重新启动IIS，成功后会有如下显示：</p>
<p>4. httpd.ini 是配置文件,如果您了解Rewrite 规则,可以直接对其进行编辑;<br />
5. 默认规则为wordpress专用，其他PHP程序伪静态无法使用;<br />
备注：在前三项成功完成后，将httpd.ini传送到网站跟目录就完成了伪静态环境搭建，下边开始进入后台，设置永久链接采用自定义方式，代码可以参考官方：http://codex.wordpress.org/Using_Permalinks，设置您喜欢的显示方式即可[例子:/%category%/%postname%.html 含义是按照分类目录名称/内容页名称.html方式,增加html就是大家喜欢看到的静态标识 ]伪静态就这样建立完成了；</p>
<p><strong>第二个方法：</strong></p>
<p>Windows主机下安装WordPress程序，默认实现不了像Linux系统环境下的完美伪静态，这也是Windows主机用户安装WordPress程序最为头疼的地方，这里WPYOU把相关方法分享给大家：</p>
<p><strong>方法1：</strong><br />
1.1 首先，主机装Rewrite 组件，现在国内很多Windows主机默认就装这个组件了。最好做伪静态的时候先问下你的空间商。</p>
<p>1.2 主机启用了Rewrite模块后，剩下的只需要一个httpd.ini就能解决问题了。</p>
<p>httpd.ini是指wordpress程序在windows虚拟主机上的伪静态设置。下面就贴出WP伪静态的httpd.ini代码：</p>
<pre class="brush: plain; title: ; notranslate">[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]</pre>
<p>1.3 把httpd.ini直接上传到网站根目录即可实现。</p>
<p>总结：这种方式是实现Windows主机的伪静态最简单快捷的方法。</p>
<p><strong>方法2：</strong><br />
如果方法1 中代码不能实现，可以试下下面这段代码（同样是放到httpd.ini中，然后上传到网站根目录）：</p>
<pre class="brush: plain; title: ; notranslate">[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# wordpress 伪静态规则
# For tag（中文标签以及标签翻页的规则）
RewriteRule /tag/(.*)/page/(\d+)$ /index\.php\?tag=$1&amp;paged=$2
RewriteRule /tag/(.+)$ /index\.php\?tag=$1
# For category（中文分类以及分类翻页的规则）
RewriteRule /category/(.*)/page/(\d+)$ /index\.php\?category_name=$1&amp;paged=$2
RewriteRule /category/(.*) /index\.php\?category_name=$1
# For sitemapxml
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /sitemap.html /sitemap.html [L]
RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.msland.cn/wordpress-win-rewrite.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
