<?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://fugui.in/tag/rewrite/feed" rel="self" type="application/rss+xml" />
	<link>http://fugui.in</link>
	<description>fugui.in是在美国注册的印度的域名用的新加坡的服务器的中国人的网站</description>
	<lastBuildDate>Mon, 06 Sep 2010 13:39:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress URL Rewrite</title>
		<link>http://fugui.in/443.aspx</link>
		<comments>http://fugui.in/443.aspx#comments</comments>
		<pubDate>Sun, 04 Apr 2010 12:34:23 +0000</pubDate>
		<dc:creator>PHP</dc:creator>
				<category><![CDATA[精品资源]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[美国服务器]]></category>
		<category><![CDATA[美国网站空间]]></category>

		<guid isPermaLink="false">http://fugui.in/?p=443</guid>
		<description><![CDATA[WordPress URL Rewrite 在 windows IIS下最完美的解决方案。 这种方法适合能自己管理服务器或者和你的空间商搞好关系，要他们帮你安装个免费的ISAPI扩展插件，直接就可以使用 WordPress 的永久固定链接。 ISAPI插件地址：http://www.binaryfortress.com/wordpress-url-rewrite/ IIS下演示 看： http://blog.tensay.com 使用的是www.wangku.org 的美国服务器 网酷美国主机 美国空间完美支持 wordpress]]></description>
			<content:encoded><![CDATA[<p>WordPress URL Rewrite 在 windows IIS下最完美的解决方案。<br />
这种方法适合能自己管理服务器或者和你的空间商搞好关系，要他们帮你安装个免费的ISAPI扩展插件，直接就可以使用 WordPress 的永久固定链接。<br />
ISAPI插件地址：<a href="http://www.binaryfortress.com/wordpress-url-rewrite/" target="_blank">http://www.binaryfortress.com/wordpress-url-rewrite/</a><br />
IIS下演示 看： <a href="http://blog.tensay.com">http://blog.tensay.com</a></p>
<p>使用的是<a href="http://www.wangku.org">www.wangku.org</a> 的美国服务器 网酷美国主机 美国空间完美支持 wordpress</p>
]]></content:encoded>
			<wfw:commentRss>http://fugui.in/443.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zen cart iis下isapi_rewrite规则和IIRF2.1规则</title>
		<link>http://fugui.in/399.aspx</link>
		<comments>http://fugui.in/399.aspx#comments</comments>
		<pubDate>Thu, 04 Mar 2010 04:33:57 +0000</pubDate>
		<dc:creator>PHP</dc:creator>
				<category><![CDATA[精品资源]]></category>
		<category><![CDATA[iirf]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[zen cart]]></category>
		<category><![CDATA[zencart]]></category>

		<guid isPermaLink="false">http://fugui.in/?p=399</guid>
		<description><![CDATA[Isapi_rewrite和iirf都用这个规则就可以。 [ISAPI_Rewrite] ##### NOTE: Replace /shop/ with the relative web path of your catalog in the &#8220;Rewrite Base&#8221; line below: Options +FollowSymLinks Options FollowSymLinks AllowOverride All RewriteEngine On RewriteBase / # From Ultimate SEO URLs RewriteRule ^(.*)-p-(.*).html /index.php?main_page=product_info&#38;products_id=$2&#38;%{QUERY_STRING} [L] RewriteRule &#8230; <a href="http://fugui.in/399.aspx">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Isapi_rewrite和iirf都用这个规则就可以。</p>
<blockquote><p>[ISAPI_Rewrite]</p>
<p>##### NOTE: Replace /shop/ with the relative web path of your catalog in the &#8220;Rewrite Base&#8221; line below:</p>
<p>Options +FollowSymLinks<br />
Options FollowSymLinks<br />
AllowOverride All<br />
RewriteEngine On<br />
RewriteBase /</p>
<p># From Ultimate SEO URLs<br />
RewriteRule ^(.*)-p-(.*).html /index.php?main_page=product_info&amp;products_id=$2&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^(.*)-c-(.*).html /index.php?main_page=index&amp;cPath=$2&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^(.*)-m-([0-9]+).html /index.php?main_page=index&amp;manufacturers_id=$2&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^(.*)-pi-([0-9]+).html /index.php?main_page=popup_image&amp;pID=$2&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^(.*)-pr-([0-9]+).html /index.php?main_page=product_reviews&amp;products_id=$2&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^(.*)-pri-([0-9]+).html /index.php?main_page=product_reviews_info&amp;products_id=$2&amp;%{QUERY_STRING} [L]</p>
<p># For Open Operations Info Manager<br />
RewriteRule ^(.*)-i-([0-9]+).html /index.php?main_page=info_manager&amp;pages_id=$2&amp;%{QUERY_STRING} [L]</p>
<p># For dreamscape&#8217;s News &amp; Articles Manager<br />
RewriteRule ^news/?$ index.php?main_page=news&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^news/rss.xml /index.php?main_page=news_rss&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^news/archive/? /index.php?main_page=news_archive&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html /index.php?main_page=news&amp;date=$1-$2-$3&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html /index.php?main_page=news_archive&amp;date=$1-$2&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^news/(.*)-a-([0-9]+)-comments.html /index.php?main_page=news_comments&amp;article_id=$2&amp;%{QUERY_STRING} [L]<br />
RewriteRule ^news/(.*)-a-([0-9]+).html /index.php?main_page=news_article&amp;article_id=$2&amp;%{QUERY_STRING} [L]</p>
<p># All other pages<br />
# Don&#8217;t rewrite real files or directories<br />
RewriteCond %{REQUEST_FILENAME} !-f [NC]<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule ^(.*).html /index.php?main_page=$1&amp;%{QUERY_STRING} [L]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://fugui.in/399.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IIRF Drupal, WordPress and IIS6 rewrite完美规则</title>
		<link>http://fugui.in/389.aspx</link>
		<comments>http://fugui.in/389.aspx#comments</comments>
		<pubDate>Mon, 22 Feb 2010 14:06:07 +0000</pubDate>
		<dc:creator>PHP</dc:creator>
				<category><![CDATA[互联网观察]]></category>
		<category><![CDATA[精品资源]]></category>
		<category><![CDATA[iirf]]></category>
		<category><![CDATA[iirf2.1]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://fugui.in/?p=389</guid>
		<description><![CDATA[Drupal  (all versions) RewriteCond %{HTTP_HOST} ^(www\.yourdomainname\.com).*$ [I] RedirectRule ^/(.*)$ http://yourdomainname.com/$1 [I,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(?!favicon.ico$)([^?]*)(?:\?(.*))?$ /index.php?q=$1&#38;$2 [L] WordPress (all versions) RewriteCond %{HTTP_HOST} ^(yourdomainname\.com).*$ [I] RedirectRule ^/(.*)$ http://www.yourdomainname.com/$1 [I,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*)$ &#8230; <a href="http://fugui.in/389.aspx">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Drupal  (all versions)</h2>
<pre>RewriteCond %{HTTP_HOST} ^(www\.yourdomainname\.com).*$ [I]
RedirectRule ^/(.*)$ http://yourdomainname.com/$1 [I,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(?!favicon.ico$)([^?]*)(?:\?(.*))?$ /index.php?q=$1&amp;$2 [L]</pre>
<h2>WordPress (all versions)</h2>
<pre>RewriteCond %{HTTP_HOST} ^(yourdomainname\.com).*$ [I]
RedirectRule ^/(.*)$ http://www.yourdomainname.com/$1 [I,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /index.php/$1 [L]

IIS下rewrite存在的主要问题还是中文分类和tag的问题，不是很好解决，上面的规则在英文站点下没有任何问题。</pre>
]]></content:encoded>
			<wfw:commentRss>http://fugui.in/389.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress在iis下完美的rewrite规则isapi_rewrite和iirf的都支持</title>
		<link>http://fugui.in/382.aspx</link>
		<comments>http://fugui.in/382.aspx#comments</comments>
		<pubDate>Sat, 20 Feb 2010 16:29:53 +0000</pubDate>
		<dc:creator>PHP</dc:creator>
				<category><![CDATA[互联网观察]]></category>
		<category><![CDATA[iirf]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[isapi_rewrite]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://fugui.in/?p=382</guid>
		<description><![CDATA[IIS下 wordpress也可以有完美的rewrite 包含三种常用永久链接规则: /post/%post_id%.html /%year%/%monthnum%/%day%/%postname%/ /%year%/%monthnum%/%day%/%postname%.html iis下 isapi_rewrite的规则 # from accessing through HTTP # # WordPress rewrite rules# # # Below is for permalink like /post/%post_id%.html # # Provided By Sideblue # # URL:http://www.xbaohe.com RewriteRule /post/tag/(.*) /index\.php\?tag=$1 RewriteRule /tag/(.*) /index\.php\?tag=$1 &#8230; <a href="http://fugui.in/382.aspx">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>IIS下 wordpress也可以有完美的rewrite<br />
包含三种常用永久链接规则:</p>
<li>/post/%post_id%.html</li>
<li>/%year%/%monthnum%/%day%/%postname%/</li>
<li>/%year%/%monthnum%/%day%/%postname%.html</li>
<p>iis下 isapi_rewrite的规则<span id="more-382"></span></p>
<blockquote>
<li># from accessing through HTTP</li>
<li># # WordPress rewrite rules#</li>
<li># # Below is for permalink like /post/%post_id%.html</li>
<li># # Provided By Sideblue</li>
<li># # URL:http://www.xbaohe.com</li>
<li>RewriteRule /post/tag/(.*) /index\.php\?tag=$1</li>
<li>RewriteRule /tag/(.*) /index\.php\?tag=$1</li>
<li>RewriteRule /(contact|about-copyright|favor|archives|tags|sitemap) /index\.php\?pagename=$1</li>
<li>RewriteRule /post/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&amp;feed=$2</li>
<li>RewriteRule /post/category/?(.*) /index\.php\?category_name=$1</li>
<li>RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&amp;feed=$2</li>
<li>RewriteRule /author/?(.*) /index\.php\?author_name=$1</li>
<li>RewriteRule /rss.xml /wp-feed\.php/\?feed=rss2</li>
<li>RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2</li>
<li>RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2</li>
<li># RewriteRule /([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&amp;page=$2</li>
<li># RewriteRule /post/([0-9]+)/?([0-9]+)?/?$ /index\.php\?p=$1&amp;page=$2</li>
<li>RewriteRule /post/([0-9]+).html /index\.php\?p=$1</li>
<li>RewriteRule /page/(.*)/?s=(.*) /index\.php\?s=$2&amp;paged=$1</li>
<li>RewriteRule /page/(.*) /index\.php\?paged=$1</li>
<li>RewriteRule /post/date/([0-9]{4})([0-9]{1,2})([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;name=$4&amp;page=$5</li>
<li>RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;page=$4</li>
<li>RewriteRule /post/date/([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;page=$3</li>
<li>RewriteRule /post/([0-9]+).html/(feed|rdf|rss|rss2|atom) /index\.php\?feed=rss2&amp;p=$1</li>
<li>RewriteRule /post/([0-9]+).html/trackback /wp-trackback\.php\?p=$1</li>
<li># # Below is for permalink like /%year%/%monthnum%/%day%/%postname%.html</li>
<li># # Maybe dumplicate with above!!</li>
<li># # Provided By Sideblue</li>
<li># # URL:http://www.xbaohe.com</li>
<li>RewriteRule /tag/(.*) /index\.php\?tag=$1</li>
<li>RewriteRule /(contact|about-copyright|favor|archives|tags|sitemap)/ /index\.php\?pagename=$1</li>
<li>RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&amp;feed=$2</li>
<li>RewriteRule /category/?(.*) /index\.php\?category_name=$1</li>
<li>RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&amp;feed=$2</li>
<li>RewriteRule /author/?(.*) /index\.php\?author_name=$1</li>
<li>RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2</li>
<li>RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2</li>
<li>RewriteRule /page/(.*)/ /index\.php\?paged=$1</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?([0-9]+)?.html/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;name=$4&amp;page=$5</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;page=$4</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;page=$3</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+).html/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;name=$4&amp;feed=$5</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+).html/trackback/?$ /wp-trackback\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;name=$4&amp;tb=1</li>
<li># # Below is for permalink like /%year%/%monthnum%/%day%/%postname%/</li>
<li># # Maybe dumplicate with above!!</li>
<li># # Provided By Sideblue</li>
<li># # URL:http://www.xbaohe.com</li>
<li>RewriteRule /tag/(.*) /index\.php\?tag=$1</li>
<li>RewriteRule /(contact|about-copyright|favor|archives|tags|sitemap)/ /index\.php\?pagename=$1</li>
<li>RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&amp;feed=$2</li>
<li>RewriteRule /category/?(.*)/ /index\.php\?category_name=$1</li>
<li>RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&amp;feed=$2</li>
<li>RewriteRule /author/?(.*) /index\.php\?author_name=$1</li>
<li>RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2</li>
<li>RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2</li>
<li>RewriteRule /page/(.*)/ /index\.php\?paged=$1</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;name=$4&amp;page=$5</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;page=$4</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;page=$3</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;name=$4&amp;feed=$5</li>
<li>RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$ /wp-trackback\.php\?year=$1&amp;monthnum=$2&amp;day=$3&amp;name=$4&amp;tb=1</li>
</blockquote>
<p>IIRF很简单，只要把上面的规则 右边的反斜线\都去掉就可以了。</p>
<p>上面都是别人写的，我感觉写的很好，每种需求都包括了，保存起来以后用起来方便。</p>
]]></content:encoded>
			<wfw:commentRss>http://fugui.in/382.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iis下不支持$_SERVER[&#039;REQUEST_URI&#039;]的解决办法</title>
		<link>http://fugui.in/348.aspx</link>
		<comments>http://fugui.in/348.aspx#comments</comments>
		<pubDate>Tue, 09 Feb 2010 01:27:44 +0000</pubDate>
		<dc:creator>PHP</dc:creator>
				<category><![CDATA[互联网观察]]></category>
		<category><![CDATA[精品资源]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[REQUEST_URI]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://fugui.in/?p=348</guid>
		<description><![CDATA[// Fix for IIS, which doesn't set REQUEST_URI if ( empty( $_SERVER['REQUEST_URI'] ) ) { // IIS Mod-Rewrite if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) { $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL']; } // IIS Isapi_Rewrite else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; } else { // Use &#8230; <a href="http://fugui.in/348.aspx">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><code>// Fix for IIS, which doesn't set REQUEST_URI<br />
if ( empty( $_SERVER['REQUEST_URI'] ) ) {</p>
<p>// IIS Mod-Rewrite<br />
if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {<br />
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];<br />
}<br />
// IIS Isapi_Rewrite<br />
else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {<br />
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];<br />
}<br />
else<br />
{<br />
// Use ORIG_PATH_INFO if there is no PATH_INFO<br />
if ( !isset($_SERVER['PATH_INFO']) &amp;&amp; isset($_SERVER['ORIG_PATH_INFO']) )<br />
$_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];</p>
<p>// Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice)<br />
if ( isset($_SERVER['PATH_INFO']) ) {<br />
if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] )<br />
$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];<br />
else<br />
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];<br />
}</p>
<p>// Append the query string if it exists and isn't null<br />
if (isset($_SERVER['QUERY_STRING']) &amp;&amp; !empty($_SERVER['QUERY_STRING'])) {<br />
$_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];<br />
}<br />
}<br />
}</code></p>
<p><strong>或者这里 看里面的程序是这样写的<br />
可以参考这里来设置</strong><br />
* Instructions: <a href="http://neosmart.net/blog/2006/100-apache-compliant-request_uri-for-iis-and-windows/">http://neosmart.net/blog/2006/100-apache-compliant-request_uri-for-iis-and-windows/</a><br />
* Support: <a href="http://neosmart.net/forums/forumdisplay.php?f=17">http://neosmart.net/forums/forumdisplay.php?f=17</a><br />
* Product URI: <a href="http://neosmart.net/dl.php?id=7">http://neosmart.net/dl.php?id=7</a><span id="more-348"></span><br />
<code><!--p<br-->/*<br />
* REQUEST_URI for IIS Servers<br />
* Version: 1.1<br />
* Guaranteed to provide Apache-compliant $_SERVER['REQUEST_URI'] variables<br />
* Please see full documentation at </p>
<p>* Copyright NeoSmart Technologies 2006-2008<br />
* Code is released under the LGPL and maybe used for all private and public code</p>
<p>* Instructions: http://neosmart.net/blog/2006/100-apache-compliant-request_uri-for-iis-and-windows/<br />
* Support: http://neosmart.net/forums/forumdisplay.php?f=17<br />
* Product URI: http://neosmart.net/dl.php?id=7<br />
*/</p>
<p>//This file should be located in the same directory as php.exe or php5isapi.dll</p>
<p>//ISAPI_Rewrite 3.x<br />
if (isset($_SERVER['HTTP_X_REWRITE_URL'])){<br />
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];<br />
}<br />
//ISAPI_Rewrite 2.x w/ HTTPD.INI configuration<br />
else if (isset($_SERVER['HTTP_REQUEST_URI'])){<br />
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REQUEST_URI'];<br />
//Good to go!<br />
}<br />
//ISAPI_Rewrite isn't installed or not configured<br />
else{<br />
//Someone didn't follow the instructions!<br />
if(isset($_SERVER['SCRIPT_NAME']))<br />
$_SERVER['HTTP_REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];<br />
else<br />
$_SERVER['HTTP_REQUEST_URI'] = $_SERVER['PHP_SELF'];<br />
if($_SERVER['QUERY_STRING']){<br />
$_SERVER['HTTP_REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];<br />
}<br />
//WARNING: This is a workaround!<br />
//For guaranteed compatibility, HTTP_REQUEST_URI or HTTP_X_REWRITE_URL *MUST* be defined!<br />
//See product documentation for instructions!<br />
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REQUEST_URI'];<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://fugui.in/348.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iis下discuz用iirf rewrite实现伪静态</title>
		<link>http://fugui.in/344.aspx</link>
		<comments>http://fugui.in/344.aspx#comments</comments>
		<pubDate>Mon, 08 Feb 2010 11:05:12 +0000</pubDate>
		<dc:creator>PHP</dc:creator>
				<category><![CDATA[互联网观察]]></category>
		<category><![CDATA[精品资源]]></category>
		<category><![CDATA[discuz]]></category>
		<category><![CDATA[iirf]]></category>
		<category><![CDATA[iirf规则]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://fugui.in/?p=344</guid>
		<description><![CDATA[RewriteCond %{HTTP_HOST} ^tensay\.com$ [I] RedirectRule ^/(.*)$ http://www.tensay.com/$1 # 上面这两行是我的网站自己设置的 全站重定向不带www的自动转到带www的域名 RewriteRule ^(.*)/archiver/((fid&#124;tid)-[\w\-]+\.html)\?*(.*)$ $1/archiver/index.php?$2&#038;$4 [L] RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay.php?fid=$2&#038;page=$3&#038;$4 [L] RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread.php?tid=$2&#038;extra=page%3D$4&#038;page=$3&#038;$4 [L] RewriteRule ^(.*)/space-(username&#124;uid)-(.+)\.html\?*(.*)$ $1/space.php?$2=$3&#038;$4 [L] RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag.php?name=$2&#038;$3 [L] RewriteRule ^/(space&#124;network)-(.+)\.html$ /$1.php?rewrite=$2 [L] RewriteRule ^/(space&#124;network)\.html$ /$1.php [L] RewriteRule ^/([0-9]+)$ &#8230; <a href="http://fugui.in/344.aspx">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><code>RewriteCond %{HTTP_HOST} ^tensay\.com$ [I]<br />
RedirectRule ^/(.*)$   http://www.tensay.com/$1<br />
# 上面这两行是我的网站自己设置的 全站重定向不带www的自动转到带www的域名<br />
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)\?*(.*)$ $1/archiver/index.php?$2&#038;$4 [L]<br />
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay.php?fid=$2&#038;page=$3&#038;$4 [L]<br />
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread.php?tid=$2&#038;extra=page%3D$4&#038;page=$3&#038;$4 [L]<br />
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space.php?$2=$3&#038;$4 [L]<br />
RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag.php?name=$2&#038;$3 [L]<br />
RewriteRule ^/(space|network)-(.+)\.html$ /$1.php?rewrite=$2 [L]<br />
RewriteRule ^/(space|network)\.html$ /$1.php [L]<br />
RewriteRule ^/([0-9]+)$ /space.php?uid=$1 [L]</code><br />
就是这样，搞了一晚上了，终于把iirf的规则弄的差不多了，以后边用边学。<br />
规则文件格式基本照搬ISAPI Rewrite，稍作修改<br />
RewriteRule [源URL正则条件] [目的URL]<br />
ISAPI Rewrite与IIRF的区别就在[目的URL]，ISAPI Rewrite的要转义，而IIRF不用转义。<br />
如果网上有现成的ISAPI Rewrite的规则可以直接复制过来，将[目的URL]中的反斜杠（\）一个个删除就可以用在IIRF中用了。<br />
知道这个之后，你就可以随便在网上与人交流，按ISAPI Rewrite交流，最后把转义符（\）删掉就行了。</p>
]]></content:encoded>
			<wfw:commentRss>http://fugui.in/344.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ionic’s Isapi Rewrite Filter (IIRF2.1)</title>
		<link>http://fugui.in/204.aspx</link>
		<comments>http://fugui.in/204.aspx#comments</comments>
		<pubDate>Mon, 11 Jan 2010 15:09:38 +0000</pubDate>
		<dc:creator>PHP</dc:creator>
				<category><![CDATA[精品资源]]></category>
		<category><![CDATA[iirf2.1]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://fugui.in/?p=204</guid>
		<description><![CDATA[现在我用的是IIRF 2.0(Ionics Isapi Rewrite Filter)，2.1只出到测试版。 搞了一晚上，一加载网站就不工作了。先搜集点资料，过几天单独弄个机器测试，感觉跟plesk有关系，影响筛选的加载，用isapi_rewrite也一样，单独添加dll文件的方式行不通，只能用安装文件。 一、IIRF的简介：这个就不用详表了，基于Win IIS的开源免费Isapi，功能可以用到动态页面静态化、多泛域名解析、防盗链等等很多领域。具体详细简介可以GG（BS Baidu），雷同也不要紧。官方网站是：http://www.codeplex.com/IIRF 　　二、IIRF的安装： 　　安装还算比较简单，相比我上一个用的1.2版本，多个网站不再需要复制多个dll给不同的网站用了，整个IIS可以可以用一个dll还可以多个网站用一个。 　　1、我们将下载下来的文件解压，只要找到bin目录下的IIRF.dll文件即可，其他文件都是没有太大用处的，找到这个文件后将其复制到一个合适的目录，我的目的就是多个网站都用这一个dll，所以我将它放置在一个自己整理的服务应用文件夹内；确保该文件夹IIS_WPG或者IUSR_XXX之类的账号拥有权限访问； 　　2、在IIS管理界面的每个网站右键-&#62;属性（如果想作用在整个IIS，那么就在网站列表上级“网站”节点上右键-&#62;属性），选择ISAPI筛选器-&#62;添加-&#62;输入一个筛选器名字-&#62;选择可执行文件（指定到刚刚安置好的dll文件）-&#62;确定，重启IIS就OK了； 　　3、检查是否已经加载了dll，只要同样打开ISAPI筛选器管理界面，看到绿色的箭头即可，至于是Low还是High不重要。如果怎么弄都是未知，那么建议删掉这个网站重建建立再试；值得一提的是，配置文件是动态加载的，我们在下面配置的配置文件的时候不需要重新启动IIS就可以看到配置文件的结果； 　　４、配置配置文件，之前如果我们想要作用在所有加载了这个dll的网站的配置，我们可以在dll文件夹创建一个IirfGlobal.ini文件，这个文件可以使所有加载了同文件夹内的dll的所有网站使用这个相同的配置，单个配置就需要在每个网站的根目录创建一个文件名IIRF.ini的文件，并在其中编写规则即可；OK，这样，你的IIRF就安装完成了。 　　三、IIRF的Log文件： 　　在我们调试规则的时候，我们需要看一下调试的内容Log一边纠正规则： RewriteLog c:\temp\iirfLog.out RewriteLogLevel 0 路径设置，确保文件夹的存在，否则会生成错误系统Log，但不影响IIRF的运行 日志的等级,默认值为0 0 – 不会记录日志 1 – 少许的日志 2 – 比较多的日志 3 – 比较详细的日志 4 – 详细的日志，并会跟踪server variable和替换的字符串。 5 &#8230; <a href="http://fugui.in/204.aspx">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>现在我用的是IIRF 2.0(Ionics Isapi Rewrite Filter)，2.1只出到测试版。<br />
搞了一晚上，一加载网站就不工作了。先搜集点资料，过几天单独弄个机器测试，感觉跟plesk有关系，影响筛选的加载，用isapi_rewrite也一样，单独添加dll文件的方式行不通，只能用安装文件。<span id="more-204"></span></p>
<blockquote><p>一、IIRF的简介：这个就不用详表了，基于Win IIS的开源免费Isapi，功能可以用到动态页面静态化、多泛域名解析、防盗链等等很多领域。具体详细简介可以GG（BS Baidu），雷同也不要紧。官方网站是：<a href="http://www.codeplex.com/IIRF">http://www.codeplex.com/IIRF</a></p>
<p>　　二、IIRF的安装：<br />
　　安装还算比较简单，相比我上一个用的1.2版本，多个网站不再需要复制多个dll给不同的网站用了，整个IIS可以可以用一个dll还可以多个网站用一个。<br />
　　1、我们将下载下来的文件解压，只要找到bin目录下的IIRF.dll文件即可，其他文件都是没有太大用处的，找到这个文件后将其复制到一个合适的目录，我的目的就是多个网站都用这一个dll，所以我将它放置在一个自己整理的服务应用文件夹内；确保该文件夹IIS_WPG或者IUSR_XXX之类的账号拥有权限访问；<br />
　　2、在IIS管理界面的每个网站右键-&gt;属性（如果想作用在整个IIS，那么就在网站列表上级“网站”节点上右键-&gt;属性），选择ISAPI筛选器-&gt;添加-&gt;输入一个筛选器名字-&gt;选择可执行文件（指定到刚刚安置好的dll文件）-&gt;确定，重启IIS就OK了；<br />
　　3、检查是否已经加载了dll，只要同样打开ISAPI筛选器管理界面，看到绿色的箭头即可，至于是Low还是High不重要。如果怎么弄都是未知，那么建议删掉这个网站重建建立再试；值得一提的是，<strong>配置</strong>文件是动态加载的，我们在下面<strong>配置</strong>的<strong>配置</strong>文件的时候不需要重新启动IIS就可以看到<strong>配置</strong>文件的结果；<br />
　　４、<strong>配置</strong><strong>配置</strong>文件，之前如果我们想要作用在所有加载了这个dll的网站的<strong>配置</strong>，我们可以在dll文件夹创建一个IirfGlobal.ini文件，这个文件可以使所有加载了同文件夹内的dll的所有网站使用这个相同的<strong>配置</strong>，单个<strong>配置</strong>就需要在每个网站的根目录创建一个文件名<strong>IIRF.ini</strong>的文件，并在其中编写规则即可；OK，这样，你的IIRF就安装完成了。</p>
<p>　　三、IIRF的Log文件：<br />
　　在我们调试规则的时候，我们需要看一下调试的内容Log一边纠正规则：</p>
<div>
<div>
<pre>RewriteLog c:\temp\iirfLog.out
RewriteLogLevel 0</pre>
</div>
</div>
<p>路径设置，确保文件夹的存在，否则会生成错误系统Log，但不影响IIRF的运行<br />
日志的等级,默认值为0<br />
0 – 不会记录日志<br />
1 – 少许的日志<br />
2 – 比较多的日志<br />
3 – 比较详细的日志<br />
4 – 详细的日志，并会跟踪server variable和替换的字符串。<br />
5 – 详细的日志，包括日志文件更改的事件，建议方便调试的时候使用</p>
<p>　　四、规则<br />
　　规则格式：</p>
<div>
<div>
<pre>RewriteRule   []</pre>
</div>
</div>
<p>url-pattern: 匹配的正则表达式(必需)<br />
replacement-string: 要替换的字符串（必需）<br />
modifiers: 有关对RewriteRule的操作标记，可选选项<br />
modifiers的功能。下面列举了它的所有值，允许组合(如[R,L])。<br />
R = Redirect（URL跳转到&lt;replacement-string&gt;地址）<br />
NF = Not found（返回404错误给用户，但该文件并未移除，还是保留在网站中）<br />
L = Last test if match（如果已经匹配，将不在继续匹配下去）<br />
F = Forbidden（跟NF标志相似）<br />
I = Do case-insensitive matching（不区分大小写）<br />
U = Store original url in server Variable HTTP_X_REWRITE_URL（保存原始的url到HTTP_X_REWRITE_URL服务器变量中）</p></blockquote>
<p>IIRF的配置目录结构如下（仅供参考）：</p>
<p>#IIRF 本机配置目录   </p>
<blockquote><p>C:\WINDOWS\system32\inetsrv\IIRF\IIRF.dll   <br />
C:\WINDOWS\system32\inetsrv\IIRF\IIRF.ini   <br />
C:\WINDOWS\system32\inetsrv\IIRF\IirfGlobal.ini     </p></blockquote>
<p>#IIRF 在项目中的配置文件   </p>
<p>E:\Work\Code\myforum\IIRF.ini  </p>
<p>IIRF.ini (一定要和IIRF.dll文件在同一目录下)</p>
<blockquote><p>RewriteFilterPriority HIGH<br />
NotifyLog ON<br />
RewriteEngine ON</p></blockquote>
<p>IirfGlobal.ini （这个文件不是必须的但是最好写上）</p>
<blockquote><p>RewriteEngine ON</p></blockquote>
<p>E:\Work\Code\myforum\IIRF.ini （貌似类似 Apache 的 .htaccess）</p>
<blockquote><p># -CodeIgniter- TO REMOVE index.php FROM URL  <br />
RewriteCond %{REQUEST_FILENAME} !-f  <br />
RewriteCond %{REQUEST_FILENAME} !-d  <br />
RewriteRule ^(.*)$   /index.php/$1 [L] </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://fugui.in/204.aspx/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>wordpress还是要装在linux下url很重要</title>
		<link>http://fugui.in/121.aspx</link>
		<comments>http://fugui.in/121.aspx#comments</comments>
		<pubDate>Mon, 28 Dec 2009 14:52:04 +0000</pubDate>
		<dc:creator>PHP</dc:creator>
				<category><![CDATA[互联网观察]]></category>
		<category><![CDATA[免费资源]]></category>
		<category><![CDATA[精品资源]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[服务器]]></category>
		<category><![CDATA[空间]]></category>

		<guid isPermaLink="false">http://fugui.in/?p=121</guid>
		<description><![CDATA[我就把整个中文标题作为网址rewrite，这样搜索引擎对我很友好。 wordpress2.9对iis的支持局限性还是很大的，2008的iis7可能会好一点，但是实际效果还是不如linux+apache的.htaccess效果好。 搜索引擎对网址中的文字好像更喜欢。 在iis和linux直接换来换去，rewrite方式也变来变去，还是linux下好。 现在的wordpress如果要做seo一定要用linux. 买空间推荐www.wangku.org 的 三款linux机器。 价格便宜 速度快。]]></description>
			<content:encoded><![CDATA[<p>我就把整个中文标题作为网址rewrite，这样搜索引擎对我很友好。<br />
wordpress2.9对iis的支持局限性还是很大的，2008的iis7可能会好一点，但是实际效果还是不如linux+apache的.htaccess效果好。<br />
搜索引擎对网址中的文字好像更喜欢。<br />
在iis和linux直接换来换去，rewrite方式也变来变去，还是linux下好。<br />
现在的wordpress如果要做seo一定要用linux.<br />
买空间推荐<a href="http://www.wangku.org">www.wangku.org</a> 的 三款linux机器。 价格便宜 速度快。</p>
]]></content:encoded>
			<wfw:commentRss>http://fugui.in/121.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
