<?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>Jennal's Blog &#187; Apache</title>
	<atom:link href="http://jennal.cn/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://jennal.cn</link>
	<description>Jennal的技术博客</description>
	<lastBuildDate>Tue, 06 Mar 2012 00:51:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache虚拟主机的设置</title>
		<link>http://jennal.cn/2009/12/29/apache%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%9a%84%e8%ae%be%e7%bd%ae/</link>
		<comments>http://jennal.cn/2009/12/29/apache%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%9a%84%e8%ae%be%e7%bd%ae/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 04:34:23 +0000</pubDate>
		<dc:creator>Jennal</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://jennal.cn/2009/12/29/apache%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%9a%84%e8%ae%be%e7%bd%ae/</guid>
		<description><![CDATA[绑定多个域名到一个IP。搞了半天，原来httpd.conf漏了一句：
NameVirtualHost *:80
加在所有&#60;VirtualHost …&#62;的上方。   不过记得只能加一次，不然会有[warn] NameVirtualHost *:80 has no VirtualHosts
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="mod_rewrite: A Beginner’s Guide to URL Rewriting" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F&from=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://jennal.cn/wp-content/themes/compositio/images/avatar-replace.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">mod_rewrite: A Beginner’s Guide to URL Rewriting</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="hr高度、颜色设置的通用方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2009%2F10%2F15%2Fhr%25E9%25AB%2598%25E5%25BA%25A6%25E3%2580%2581%25E9%25A2%259C%25E8%2589%25B2%25E8%25AE%25BE%25E7%25BD%25AE%25E7%259A%2584%25E9%2580%259A%25E7%2594%25A8%25E6%2596%25B9%25E6%25B3%2595%2F&from=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://jennal.cn/wp-content/themes/compositio/images/avatar-replace.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">hr高度、颜色设置的通用方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="漫画下载器 v1.6.2" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2010%2F09%2F05%2F%25E6%25BC%25AB%25E7%2594%25BB%25E4%25B8%258B%25E8%25BD%25BD%25E5%2599%25A8-v1-6-2%2F&from=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/24/2910921.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">漫画下载器 v1.6.2</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="漫画下载器 v1.6.5" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2011%2F04%2F05%2F%25E6%25BC%25AB%25E7%2594%25BB%25E4%25B8%258B%25E8%25BD%25BD%25E5%2599%25A8-v1-6-5%2F&from=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/06/5053116.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">漫画下载器 v1.6.5</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>绑定多个域名到一个IP。搞了半天，原来httpd.conf漏了一句：</p>
<p>NameVirtualHost *:80</p>
<p>加在所有&lt;VirtualHost …&gt;的上方。   <br />不过记得只能加一次，不然会有[warn] NameVirtualHost *:80 has no VirtualHosts</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="mod_rewrite: A Beginner’s Guide to URL Rewriting" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F&from=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://jennal.cn/wp-content/themes/compositio/images/avatar-replace.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">mod_rewrite: A Beginner’s Guide to URL Rewriting</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="hr高度、颜色设置的通用方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2009%2F10%2F15%2Fhr%25E9%25AB%2598%25E5%25BA%25A6%25E3%2580%2581%25E9%25A2%259C%25E8%2589%25B2%25E8%25AE%25BE%25E7%25BD%25AE%25E7%259A%2584%25E9%2580%259A%25E7%2594%25A8%25E6%2596%25B9%25E6%25B3%2595%2F&from=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://jennal.cn/wp-content/themes/compositio/images/avatar-replace.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">hr高度、颜色设置的通用方法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="漫画下载器 v1.6.8" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2011%2F11%2F21%2F%25E6%25BC%25AB%25E7%2594%25BB%25E4%25B8%258B%25E8%25BD%25BD%25E5%2599%25A8-v1-6-8%2F&from=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/11/21/11189295.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">漫画下载器 v1.6.8</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="漫画下载器 v1.3" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2010%2F03%2F05%2F%25E6%25BC%25AB%25E7%2594%25BB%25E4%25B8%258B%25E8%25BD%25BD%25E5%2599%25A8-v1-3%2F&from=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/24/2911529.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">漫画下载器 v1.3</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://jennal.cn/2009/12/29/apache%e8%99%9a%e6%8b%9f%e4%b8%bb%e6%9c%ba%e7%9a%84%e8%ae%be%e7%bd%ae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_rewrite: A Beginner&#8217;s Guide to URL Rewriting</title>
		<link>http://jennal.cn/2008/10/10/mod_rewrite-a-beginners-guide-to-url-rewriting/</link>
		<comments>http://jennal.cn/2008/10/10/mod_rewrite-a-beginners-guide-to-url-rewriting/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 17:18:50 +0000</pubDate>
		<dc:creator>Jennal</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://jennal.cn/?p=50</guid>
		<description><![CDATA[So you&#8217;re a Web developer who has all the bells and whistles on your site, creates Web-based applications that are both beautiful and work well. But what about these issues?
Applications Must Be Safe
A user must not be able to harm your site in any way by modifying a URL that points to your applications. In [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Apache虚拟主机的设置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F&from=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://jennal.cn/wp-content/themes/compositio/images/avatar-replace.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Apache虚拟主机的设置</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="漫画下载器 v1.6" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2010%2F08%2F03%2F%25E6%25BC%25AB%25E7%2594%25BB%25E4%25B8%258B%25E8%25BD%25BD%25E5%2599%25A8-v1-6%2F&from=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/24/2910930.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">漫画下载器 v1.6</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="强烈谴责盗版！" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2011%2F02%2F17%2F%25E5%25BC%25BA%25E7%2583%2588%25E8%25B0%25B4%25E8%25B4%25A3%25E7%259B%2597%25E7%2589%2588%25EF%25BC%2581%2F&from=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/24/2910872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">强烈谴责盗版！</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Mac OS X快捷键大全" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2009%2F11%2F30%2Fmac-os-x%25E5%25BF%25AB%25E6%258D%25B7%25E9%2594%25AE%25E5%25A4%25A7%25E5%2585%25A8%2F&from=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/24/2911859.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Mac OS X快捷键大全</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p><strong>So you&#8217;re a Web developer who has all the bells and whistles on your site, creates Web-based applications that are both beautiful and work well. But what about these issues?</strong></p>
<h5>Applications Must Be Safe</h5>
<p>A user must not be able to harm your site in any way by modifying a URL that points to your applications. In order to ensure your site&#8217;s safe, check all the GET variables coming from your visitors (I think it&#8217;s trivial to mention that the POST variables are a must to examine).</p>
<p>For example, imagine we have a simple script that shows all the products in a category.o Generally, it&#8217;s called like this:</p>
<p><code>myapp.<a class="glossary" title="PHP, or Hypertext Preprocessor, is an open source, server-side programming language." href="http://www.sitepoint.com/glossary.php?q=P#term_1">php</a>?target=showproducts&amp;categoryid=123</code></p>
<p>But what will this application do if ScriptKiddie(tm) comes and types this in his browser:</p>
<p><code>myapp.php?target=showproducts&amp;categoryid=youarebeinghacked</code></p>
<p>Well, many of the sites I&#8217;ve seen will drop some error message complaining about use of the wrong SQL query, invalid <a class="glossary" title="MySQL is a free, fast, open source database." href="http://www.sitepoint.com/glossary.php?q=M#term_12">MySQL</a> resource ID, and so on&#8230; These sites are not secure. And can anyone guarantee that a site-to-be-finished-yesterday will have all the parameter verifications &#8211;even in a programmer group having only 2 or 3 people?</p>
<p><em><strong>Applications Must Be Search-Engine Friendly</strong></em></p>
<p>It&#8217;s not generally known, but many of the search engines will not index your site in depth if it contains links to dynamic pages like the one mentioned above. They simply take the &#8220;name&#8221; part of the URL (that&#8217;s everything before the question mark, which contains the parameters that are needed for most of the scripts to run correctly), and then try to fetch the contents of the page. To make it clear, here are some links from our fictitious page:</p>
<p><code>myapp.php?target=showproducts&amp;categoryid=123<br />
myapp.php?target=showproducts&amp;categoryid=124<br />
myapp.php?target=showproducts&amp;categoryid=125</code></p>
<p>Unfortunately, there&#8217;s a big chance that some of the search engines will try to download the following page:</p>
<p><code>myapp.php</code></p>
<p>In most cases calling a script like this causes an error &#8211; but if not, I&#8217;m sure it will not show the proper contents the link was pointing to. Just try this search at google.com:</p>
<p><q>&#8220;you have an error in your sql syntax&#8221; .php -forum</q></p>
<p>There are both huge bugs and security in the scripts listed &#8212; again, these scripts are not search-engine friendly.</p>
<p><em><strong>Applications must be user-friendly </strong></em></p>
<p>If you application uses links like:</p>
<p><code>http://www.downloadsite.com?category=34769845698752354</code></p>
<div id="adz" class="vertical">
<div class="ad"><a href="http://ads.aws.sitepoint.com/phpadsnew/www/delivery/ck.php?oaparams=2__bannerid=596__zoneid=90__cb=94f5f353a3__maxdest=http://www.sitepoint.com/books/project1/" target="_top"></a></div>
</div>
<p>then most of your visitors will find it difficult to get back to their favourite category (eg. Nettools/Messengers) every time they start from the main page of your site. Instead, they&#8217;d like to see URLs like this:</p>
<p><code>http://www.downloadsite.com/Nettools/Messengers</code></p>
<p>It&#8217;s even easier for the user to find (pick) the URL from the browsers&#8217; drop-down list as they type into the Location field (though of course this only works if the user has visited that previously).</p>
<p><em><strong>And what about you?</strong></em></p>
<p>Now you have everything you need to answer the following questions:</p>
<ul>
<li>Is your site really safe enough?</li>
<li>Can you protect your site from hackers?</li>
<li>Are your Websites search-engine compatible?</li>
<li>Are the URLs on your site &#8216;user friendly&#8217; &#8211; are they easy to remember? &#8230;and would you like it to be? (everyone who answered &#8216;yes&#8217; to all 4 questions: have a beer!)</li>
</ul>
<h5>An elegant solution</h5>
<p>Okay, okay, I think you want to know the solution. Well, let&#8217;s get started. You&#8217;ll need:</p>
<ul>
<li>everyone&#8217;s favourite <a class="glossary" title="Apache is one of the world's most widely-used Web servers." href="http://www.sitepoint.com/glossary.php?q=A#term_19">Apache</a> Webserver installed (v1.2 or later)</li>
<li>optionally, your favourite CGI scripts configured for Apache. Yes, I&#8217;ve said optionally, since what we&#8217;re going to do will happen right inside Apache and not PHP, or <a class="glossary" title="Perl is one of the original  server side scripting languages." href="http://www.sitepoint.com/glossary.php?q=P#term_44">Perl</a>, etc.</li>
<li>since (nearly) everything in Apache is controlled through its configuration files (httpd.conf, .htaccess, etc.), being familiar with these files might help you. You&#8217;ll also need to have write access to this file, and access to restart the Apache. I&#8217;d strongly recommend you do everything on a private testserver first, rather than on your own, or your company&#8217;s, production server!</li>
</ul>
<p>Most of you will have read and/or heard about mod_rewrite &#8212; yes, it&#8217;s an Apache module, and it&#8217;s even installed by default! Go and check your modules directory (note that under *nix operating systems there&#8217;s a chance that your Apache was compiled with missing mod_rewrite, in which case, consult your sysadmin).</p>
<p>We&#8217;re going use this tiny module to achieve everything mentioned above. To use this module, first we have to enable it, since it&#8217;s initially disabled in the configuration file. Open the httpd.conf file and uncomment the following lines (remove the trailing #s):</p>
<p><code>#LoadModule rewrite_module modules/mod_rewrite.so<br />
#AddModule mod_rewrite.c</code></p>
<p>The first line tells Apache to load the mod_rewrite module, while the second one enables the use of it. After you restart Apache, mod_rewrite should be enabled, but not yet running.</p>
<h5>What is the mod_rewrite Solution,  Exactly?</h5>
<p>But what does it exactly do? Hey! Here comes the whole point of this article!</p>
<p>mod_rewrite catches URLs that meet specific conditions, and rewrites them as it was told to.</p>
<p>For example, you can have a non-existing</p>
<p><code>http://www.mysite.com/anything</code></p>
<p>URL that is rewritten to:</p>
<p>http://www.mysite.com/deep/stuff/very_complicated_url?text=</p>
<p><code>having_lots_of_extra_characters</code></p>
<div id="adz" class="vertical">
<div class="ad">
<div id="beacon_750" style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img style="width: 0px; height: 0px;" src="http://ads.aws.sitepoint.com/phpadsnew/www/delivery/lg.php?bannerid=750&amp;campaignid=501&amp;zoneid=90&amp;loc=http%3A%2F%2Fads.aws.sitepoint.com%2Fadjs.php%3Fregion%3D90%26did%3Dadz%26adtype%3Dvertical&amp;referer=http%3A%2F%2Fwww.sitepoint.com%2Farticle%2Fguide-url-rewriting%2F2%2F&amp;cb=a916d0b012" alt="" width="0" height="0" /></div>
</div>
</div>
<p>Did you expect something more? Be patient&#8230;</p>
<p><code>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine on<br />
RewriteRule ^/shortcut$ /complicated/and/way/too/long/url/here<br />
&lt;/IfModule&gt;</code></p>
<p>Of course this, too, should go into the httpd.conf file again, (you can even put it into a virtualhost context).</p>
<p>After you restart <a class="glossary" title="Apache is one of the world's most widely-used Web servers." href="http://www.sitepoint.com/glossary.php?q=A#term_19">Apache</a> (you&#8217;ll get used to it soon!) you can type this into your browser:</p>
<p><code>http://<a class="glossary" title="&quot;Localhost&quot; is an alias for the computer system the user is working on. It's also accessible through the 127.0.0.1 address." href="http://www.sitepoint.com/glossary.php?q=L#term_42">localhost</a>/shortcut</code></p>
<p>If there&#8217;s a directory structure <code>/complicated/and/way/too/long/url/here</code> existing in your document root, you&#8217;re going to be &#8220;redirected&#8221; there, where you&#8217;ll see the contents of this directory (eg, the directory listing, index.<a class="glossary" title="HTML stands for HyperText Markup Language." href="http://www.sitepoint.com/glossary.php?q=H#term_75">html</a>, whatever there is).</p>
<p>To understand mod_rewrite better, it&#8217;s important to know that this is not true redirection. &#8220;Classic&#8221; redirection is done with the Location: header of the HTTP protocol, and tells the browser itself to go to another URL. There are numerous ways to do this, for example, in <a class="glossary" title="PHP, or Hypertext Preprocessor, is an open source, server-side programming language." href="http://www.sitepoint.com/glossary.php?q=P#term_1">PHP</a> you could write:</p>
<p><code>&lt;?<br />
// this PHP file is located at http://localhost/shortcut/index.php<br />
header<br />
("Location: /complicated/and/way/too/long/url/here");<br />
?&gt;</code></p>
<p>This code shows the same page by sending a HTTP header back to the browser. That header tells the browser to move to another URL location instantly. But, what mod_rewrite does is totally different: it &#8216;tricks&#8217; the browser, and serves the page as if it were really there &#8211; that&#8217;s why this is an URL rewriter and not a simple redirector (you can even verify the HTTP headers sent and received to understand the difference).</p>
<p>But it&#8217;s not just shortening paths that makes mod_rewrite the &#8220;Swiss Army Knife of URL manipulation&#8221;&#8230;</p>
<h5>Rules</h5>
<p>You&#8217;ve just seen how to specify a really simple RewriteRule. Now let&#8217;s take a closer look&#8230;</p>
<p><code>RewriteRule Pattern Substitution [Flag(s)]</code></p>
<p><code>RewriteRule</code> is a simple instruction that tells mod_rewrite what to do. The magic is that you can use regular expressions in the Pattern and references in the Substitution strings. What do you think of the following rule?</p>
<p><code>RewriteRule /products/([0-9]+) /siteengine/products.php?id=$1</code></p>
<p>Now you can use the following syntax in your URLs:</p>
<p><code>http://localhost/products/123</code></p>
<p>After restarting Apache, you&#8217;ll find this is translated as:</p>
<p><code>http://localhost/siteengine/products.php?id=123</code></p>
<p>If you use only &#8216;fancy&#8217; URLs in your scripts, there will be no way for your visitor to find out where your script resides (<code>/siteengine</code> in the example), what its name is (products.php), or what the name of the parameter to pass (<code>productid</code>) is! Do you like it? We&#8217;ve just completed two of our tasks, look!</p>
<ul>
<li><strong>Search-engine compatibility:</strong> there are no fancy characters in the URL, so the engines will explore your whole site</li>
<li><strong>Security:</strong> ScriptKiddie(tm)-modified URLs will cause no error, as they&#8217;re verified with the regular expression first to be a number &#8211; URLs with no proper syntax can&#8217;t even reach the script itself.</li>
</ul>
<p>Of course, you can create more complex RewriteRules. For example, here&#8217;s a set of rules I&#8217;m using on a site:</p>
<p><code> RewriteRule ^/products$ /content.php<br />
RewriteRule ^/products/([0-9]+)$ /content.php?id=$1<br />
RewriteRule<br />
^/products/([0-9]+),([ad]*),([0-9]{0,3}),([0-9]*),([0-9]*$)<br />
/marso/content.php?id=$1&amp;sort=$2&amp;order=$3&amp;start=$4</code></p>
<p>Thanks to these rules I can use the followings links in the application:</p>
<ul>
<li>Show an opening page that contains product categories:  <code>http://somesite.hu/products </code></li>
<li>Product listing, categoryid is 123, page 1 (as default), default order:  <code>http://somesite.hu/products/123  http://somesite.hu/products/123,,,, </code></li>
<li>Product listing, categoryid is 123, page 2, descending order by third field (d for descending, 3 for third field):  <code>http://somesite.hu/products/123,d,3,2</code></li>
</ul>
<p>This is also an example of the use of multiple <code>RewriteRules</code>. When there&#8217;s a <code>RegExp</code> match, the proper substitution occurs, mod_rewrite stops running and Apache serves the page with the substituted URL. Should there be no match (after processing all the rules), a usual 404 page comes up. And of course you can also define one or more rules (eg. <code>^.*$</code> as last pattern) to specify which script(s) to run depending on the mistaken URL.</p>
<p>The third, optional part of <code>RewriteRule</code> is:</p>
<p><code>RewriteRule Pattern Substitution Flag(s)</code></p>
<p>With flags, you can send specific headers to the browser when the URL matches the pattern, such as:</p>
<ul>
<li>&#8216;<code>forbidden</code>&#8216; or &#8216;<code>f</code>&#8216; for 403 forbidden,</li>
<li>&#8216;<code>gone</code>&#8216; or &#8216;<code>g</code>&#8216; for 410 gone,</li>
<li>you may also force redirection, or force a MIME-type.</li>
</ul>
<p>You can even use the:</p>
<ul>
<li>&#8216;<code>nocase</code>&#8216; or &#8216;<code>NC</code>&#8216; flag to make the pattern case-insensitive</li>
<li>&#8216;<code>next</code>&#8216;<code>/N</code>&#8216; to loop back to the first rule (&#8216;<code>next round</code>&#8216; &#8212; though this may result in an endless loop, be careful with it!)</li>
<li>&#8216;<code>skip=N</code>&#8216;<code>/'S=N</code>&#8216; to skip the following N rules</li>
</ul>
<p>&#8230;and so on.</p>
<p>I hope you feel like I felt while playing around with this module for the first time!</p>
<h5>Conditions</h5>
<p>But that&#8217;s not all! Though <code>RewriteRule</code> gives you an opportunity to have professional URL rewriting, you can make it more customized using conditions.</p>
<p>The format of the conditions is simple:</p>
<div id="adz" class="vertical">
<div class="ad"><a href="http://ads.aws.sitepoint.com/phpadsnew/www/delivery/ck.php?oaparams=2__bannerid=596__zoneid=90__cb=4f7b8d1d15__maxdest=http://www.sitepoint.com/books/project1/" target="_top"></a></p>
<div id="beacon_596" style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img style="width: 0px; height: 0px;" src="http://ads.aws.sitepoint.com/phpadsnew/www/delivery/lg.php?bannerid=596&amp;campaignid=384&amp;zoneid=90&amp;channel_ids=,&amp;loc=http%3A%2F%2Fads.aws.sitepoint.com%2Fadjs.php%3Fregion%3D90%26did%3Dadz%26adtype%3Dvertical&amp;referer=http%3A%2F%2Fwww.sitepoint.com%2Farticle%2Fguide-url-rewriting%2F3%2F&amp;cb=4f7b8d1d15" alt="" width="0" height="0" /></div>
</div>
</div>
<p><code>RewriteCond Something_to_test Condition</code></p>
<p>Any <code>RewriteCond</code> condition affects the behaviour of the following <code>RewriteRule</code>, which is a little confusing, as <code>RewriteCond</code> won&#8217;t be evaluated until the following <code>RewriteRule</code> pattern matches the current URL.</p>
<p>It works like this: mod_rewrite takes all the <code>RewriteRules</code> and starts matching the current URL against each <code>RewriteRule</code> pattern. If there&#8217;s a <code>RewriteRule</code> pattern that matches the URL, mod_rewrite checks if there are existing conditions for this <code>RewriteRule</code>, and if the first one returns true. If it does, the proper substitution will occur, but if not, mod_rewrite looks for remaining conditions. When there are no more conditions, the subsequent <code>RewriteRule</code> is checked.</p>
<p>This way you can customize URL rewriting using conditions based on practically everything that&#8217;s known during a HTTP transfer in <a class="glossary" title="Apache is one of the world's most widely-used Web servers." href="http://www.sitepoint.com/glossary.php?q=A#term_19">Apache</a> &#8212; and a lot more! Basically you can use all of these variables in the <code>Something_to_test</code> string:</p>
<ul>
<li>HTTP header variables:  <code>HTTP_USER_AGENT, HTTP_REFERER, </code> <code>HTTP_COOKIE, HTTP_FORWARDED, HTTP_HOST, HTTP_PROXY_CONNECTION, </code> <code>HTTP_ACCEPT </code></li>
<li>Connection &amp; request variables:   <code>REMOTE_ADDR, REMOTE_HOST, REMOTE_USER, </code> <code>REMOTE_IDENT, REQUEST_METHOD, SCRIPT_FILENAME, </code> <code>PATH_INFO, QUERY_STRING, AUTH_TYPE</code></li>
<li>Server internal variables:   <code>DOCUMENT_ROOT, SERVER_ADMIN, </code> <code>SERVER_NAME, SERVER_ADDR, SERVER_PORT, SERVER_PROTOCOL, </code> <code>SERVER_SOFTWARE </code></li>
<li>System variables:   <code>TIME_YEAR, TIME_MON, TIME_DAY, </code> <code>TIME_HOUR, TIME_MIN, TIME_SEC, TIME_WDAY, TIME </code></li>
<li>mod_rewrite special values:   <code>API_VERSION, THE_REQUEST, REQUEST_URI, </code> <code>REQUEST_FILENAME, IS_SUBREQ</code></li>
</ul>
<p>The condition can be a simple string or a standard regular expression, with additions like:</p>
<ul>
<li><code>&lt;, &gt;, = </code>simple comparison operators</li>
<li><code>-f</code> if <code>Something_to_test</code> is a file</li>
<li><code>-d</code> if <code>Something_to_test</code> is a directory</li>
</ul>
<p>As you can see, these are more than enough to specify a condition like this one (taken from the mod_rewrite manual):</p>
<p><code> RewriteCond %{HTTP_USER_AGENT} ^<a class="glossary" title="Free, cross-platform open source Web browser and application framework." href="http://www.sitepoint.com/glossary.php?q=M#term_31">Mozilla</a>.*<br />
RewriteRule ^/$ /homepage.max.<a class="glossary" title="HTML stands for HyperText Markup Language." href="http://www.sitepoint.com/glossary.php?q=H#term_75">html</a> [L]</code></p>
<p>RewriteCond %{HTTP_USER_AGENT} ^Lynx.*<br />
RewriteRule ^/$ /homepage.min.html [L]</p>
<p>RewriteRule ^/$ /homepage.std.html [L]</p>
<p>When a browser requests the index page, 3 things can happen:</p>
<ul>
<li>browser with a Mozilla engine the browser will be served homepage.max.html</li>
<li>using Lynx (character-based browser) the homepage.min.html will open</li>
<li>if the browser&#8217;s name doesn&#8217;t contain &#8216;Mozilla&#8217; nor &#8216;Lynx&#8217;, the standard homepage.std.html file will be sent</li>
</ul>
<p>You can even disable users from accessing images from outside your server:</p>
<p><code> RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://<a class="glossary" title="&quot;Localhost&quot; is an alias for the computer system the user is working on. It's also accessible through the 127.0.0.1 address." href="http://www.sitepoint.com/glossary.php?q=L#term_42">localhost</a>/.*$ [OR,NC]<br />
RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$ [OR,NC]<br />
RewriteCond %{HTTP_REFERER} !^http://www.mysite.com/.*$ [OR,NC]<br />
RewriteRule .*\.(<a class="glossary" title="GIF stands for Graphics Interchange Format, and is an image file format commonly used for palette-based images." href="http://www.sitepoint.com/glossary.php?q=G#term_24">gif</a>|GIF|<a class="glossary" title="JPEG, which stands for Joint Photographics Expert Group, is an image file format suitable for photographic images." href="http://www.sitepoint.com/glossary.php?q=J#term_23">jpg</a>|JPG)$ http://mysite/images/bad.gif [L,R] </code></p>
<p>But of course, there are endless possibilities, including IP- or time-dependant conditions, etc.</p>
<h5>For Advanced Users</h5>
<p>I mentioned user-friendliness in the introduction, and haven&#8217;t dealt with it. First, let&#8217;s imagine we&#8217;re having a huge download site that has the downloadable software separated into categories, each with a unique id (which is used in the SQL SELECTs). We use links like open.<a class="glossary" title="PHP, or Hypertext Preprocessor, is an open source, server-side programming language." href="http://www.sitepoint.com/glossary.php?q=P#term_1">php</a>?categoryid=23487678 to display the contents of a category.</p>
<p>To ensure that our URLs were easily memorized (eg. http://www.downloadsite.com/Nettools/Messengers) we could use:</p>
<div id="adz" class="vertical">
<div class="ad"><a href="http://ads.aws.sitepoint.com/phpadsnew/www/delivery/ck.php?oaparams=2__bannerid=648__zoneid=90__cb=f0dbfab712__maxdest=http://www.sitepoint.com/kits/revenue1/" target="_blank"></a></p>
<div id="beacon_648" style="position: absolute; left: 0px; top: 0px; visibility: hidden;"><img style="width: 0px; height: 0px;" src="http://ads.aws.sitepoint.com/phpadsnew/www/delivery/lg.php?bannerid=648&amp;campaignid=384&amp;zoneid=90&amp;channel_ids=,&amp;loc=http%3A%2F%2Fads.aws.sitepoint.com%2Fadjs.php%3Fregion%3D90%26did%3Dadz%26adtype%3Dvertical&amp;referer=http%3A%2F%2Fwww.sitepoint.com%2Farticle%2Fguide-url-rewriting%2F4%2F&amp;cb=f0dbfab712" alt="" width="0" height="0" /></div>
</div>
</div>
<p><code> RewriteRule ^/NetTools$ /test.php?target=3<br />
RewriteRule ^/NetTools/Messengers$ /test.php?target=34</code></p>
<p>assuming the ID is 3 for the NetTools category and 34 for Messengers subcategory.</p>
<p>But our site is huge, as I&#8217;ve mentioned &#8211; who wants to hunt down all the IDs from the database, and then edit the config file by hand? No-one! Instead, we can use the mapping feature of mod_rewrite. Map allows us to provide a replacement-table &#8211; stored in a single text file &#8212; within a hash file (for fast lookups), or even served through an external program!</p>
<p>For better performance I&#8217;d generate a single text file using PHP, which contains the following:</p>
<p><code> NetTools            3<br />
NetTools/Messengers 34<br />
.<br />
.<br />
.<br />
and so on.</code></p>
<p>The <code>httpd.conf</code> file would contain:</p>
<p><code> RewriteMap categories txt:/path/to/file/categoryids.txt<br />
RewriteRule ^(.*)$ open.php?categoryid=${categories:$1|0}</code></p>
<p>These lines tell mod_rewrite to read the categoryids.txt file upon <a class="glossary" title="Apache is one of the world's most widely-used Web servers." href="http://www.sitepoint.com/glossary.php?q=A#term_19">Apache</a> startup, and provide the ID for the URL for open.php. The <code>|0</code> means that <code>categoryid</code> will be 0 if there&#8217;s no matching key in the textfile.</p>
<p>You can also choose to serve the IDs on-the-fly via a script or other executable code. The program is started by Apache on server startup, and runs until shutdown. The program must have buffered I/O disabled, read from the stdin, and write results to stdout &#8212; it&#8217;s that simple!</p>
<p>With RewriteMap you can do a lot more, including:</p>
<ul>
<li>load balancing through servers (using <code>rnd:</code>),</li>
<li>creation of a Webcluster that has an homogenous URL layout,</li>
<li>redirection to mirror sites without modifying your Web application,</li>
<li>denial of user access based on a hostlist,</li>
</ul>
<p>and so on.</p>
<h5>Tips, Tricks and Advice</h5>
<ol>
<li>Before using mod_rewrite in a production server, I&#8217;d recommend setting up a testserver (or playground, whatever you prefer to call it).</li>
<li>During development, you must avoid using &#8216;old-fashioned&#8217; URLs in your application.</li>
<li>There might still be need to verify data passed through the URL (passing non-existing &#8212; too large or small &#8211; IDs, for example, might be risky).</li>
<li>Writing &#8216;intelligent&#8217; RewriteRules saved me coding time and helped me write simpler code. I&#8217;m using error_reporting(<code>E_ALL</code>); everywhere (and I recommend it!), but I find it boring to do the following for the ten thousandths time:<code>if (isset($_GET['id']) &amp;&amp; (validNumber($_GET['id']))<br />
if (isset($_GET['todo']) &amp;&amp; ($_GET['todo']=='deleteitem'))</code></p>
<p>The following trick helped me to get rid of the extra <code>isset()</code> expression by providing all the needed parameters each time in the <code>RewriteRules</code>:</p>
<p><code>RewriteRule ^/products/[0-9]+$ products.php?id=$1&amp;todo=</code></p>
<p>I know, I know it&#8217;s not the answer to the meaning of life &#8212; but it&#8217;s hard to show how nice and clear a solution this might provide in such a short example.</li>
</ol>
<h5>Finally&#8230;</h5>
<p>That&#8217;s all for our &#8216;brief&#8217; overview of mod_rewrite. After you&#8217;ve mastered the basics, you&#8217;ll find you can easily create your own rules. If you like the idea of URL rewriting, may want to play with mod_rewrite &#8211; some ideas follow (note that the underlying PHP code is not important in this case):</p>
<p><code>http://www.mysite.com/1/2/3/content.<a class="glossary" title="HTML stands for HyperText Markup Language." href="http://www.sitepoint.com/glossary.php?q=H#term_75">html</a><br />
=&gt; 1_2_3_content.html</p>
<p>http://www.mysite.com/1/2/3/content.html</p>
<p>=&gt; content.php ? category=1</code></p>
<p>http://www.mysite.com/1/2/3/</p>
<p>=&gt; content.php ? category=1 &amp; subcat1 = 2 &amp; subcat2 = 3</p>
<p>http://www.mysite.com/1/2/3/details</p>
<p>=&gt; content.php ? category=1 &amp; subcat1 = 2 &amp; subcat2 = 3</p>
<p>http://www.mysite.com/bookshop/browse/bytitle</p>
<p>=&gt; library.php ? target=listbooks &amp; order = title</p>
<p>http://www.mysite.com/bookshop/browse/byauthor</p>
<p>=&gt; library.php ? target=listbooks &amp; order = author</p>
<p>http://www.mysite.com/bookshop/product/123</p>
<p>=&gt; library.php ? target=showproduct &amp; itemid=123</p>
<p>http://www.mysite.com/bookshop/helpdesk/2</p>
<p>=&gt; library.php ? target=showhelp &amp; page=2</p>
<p>http://www.mysite.com/bookshop/registration</p>
<p>=&gt; library.php ? target=reg</p>
<p>Links</p>
<ul>
<li><a class="sublink" rel="external" href="http://directory.google.com/Top/Computers/Programming/Languages/Regular_Expressions/FAQs,_Help,_and_Tutorials/">RegExp FAQs, Help and tutorials</a></li>
<li>Search-engine friendly URLs(fortunately, the URLs listed here are already search-engine friendly <img src='http://jennal.cn/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
<ol>
<li><a class="sublink" rel="external" href="http://www.zend.com/zend/spotlight/searchengine.php">Search Engine Friendly PHP Pages, by John Coggeshall</a></li>
<li><a class="sublink" href="http://www.promotionbase.com/article/485">Search Engine-Friendly URLs, by Chris Beasley</a></li>
</ol>
</li>
<li><a class="sublink" rel="external" href="http://www.qwerksoft.com/products/iisrewrite/IISRewriteDocumentation.htm">&#8220;IISRewrite is a stripped down implementation of Apache&#8217;s mod_rewrite module for IIS&#8221;</a></li>
</ul>
<p>转自http://www.sitepoint.com/article/guide-url-rewriting/</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="4"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Apache虚拟主机的设置" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2009%2F12%2F29%2Fapache%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA%25E7%259A%2584%25E8%25AE%25BE%25E7%25BD%25AE%2F&from=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://jennal.cn/wp-content/themes/compositio/images/avatar-replace.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Apache虚拟主机的设置</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="漫画下载器 v1.6" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2010%2F08%2F03%2F%25E6%25BC%25AB%25E7%2594%25BB%25E4%25B8%258B%25E8%25BD%25BD%25E5%2599%25A8-v1-6%2F&from=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/24/2910930.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">漫画下载器 v1.6</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="Mac OS X快捷键大全" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2009%2F11%2F30%2Fmac-os-x%25E5%25BF%25AB%25E6%258D%25B7%25E9%2594%25AE%25E5%25A4%25A7%25E5%2585%25A8%2F&from=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/24/2911859.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Mac OS X快捷键大全</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="漫画下载器 v1.1" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fjennal.cn%2F2010%2F01%2F05%2F%25E6%25BC%25AB%25E7%2594%25BB%25E4%25B8%258B%25E8%25BD%25BD%25E5%2599%25A8-v1-1%2F&from=http%3A%2F%2Fjennal.cn%2F2008%2F10%2F10%2Fmod_rewrite-a-beginners-guide-to-url-rewriting%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/02/24/2911539.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 15px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">漫画下载器 v1.1</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="4" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://jennal.cn/2008/10/10/mod_rewrite-a-beginners-guide-to-url-rewriting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

