<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Rewrite underscores to hyphens for SEO URL</title>
	<atom:link href="http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Wed, 18 Nov 2009 23:28:48 -0500</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andriy</title>
		<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-109734</link>
		<dc:creator>Andriy</dc:creator>
		<pubDate>Mon, 16 Nov 2009 15:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-109734</guid>
		<description>And what&#039;s your suggestion if the URL can include up to 16 underscores that should be rewritten to hyphens?</description>
		<content:encoded><![CDATA[<p>And what&#8217;s your suggestion if the URL can include up to 16 underscores that should be rewritten to hyphens?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Phoenix</title>
		<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-80433</link>
		<dc:creator>Chris Phoenix</dc:creator>
		<pubDate>Wed, 10 Jun 2009 20:18:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-80433</guid>
		<description>The article&#039;s example code has S=5 option (skip next five rules) followed by six underscore-elimination rules.</description>
		<content:encoded><![CDATA[<p>The article&#8217;s example code has S=5 option (skip next five rules) followed by six underscore-elimination rules.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake</title>
		<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-45994</link>
		<dc:creator>Jake</dc:creator>
		<pubDate>Wed, 08 Oct 2008 21:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-45994</guid>
		<description>how can you use this rewrite but exclude directories</description>
		<content:encoded><![CDATA[<p>how can you use this rewrite but exclude directories</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stefan</title>
		<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-45975</link>
		<dc:creator>stefan</dc:creator>
		<pubDate>Wed, 08 Oct 2008 00:20:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-45975</guid>
		<description>Hello i just wondering if there is anyway to &lt;strong&gt;rewrite underscores to slashes&lt;/strong&gt;.

Thanks in advance, sorry for my bad english.</description>
		<content:encoded><![CDATA[<p>Hello i just wondering if there is anyway to <strong>rewrite underscores to slashes</strong>.</p>
<p>Thanks in advance, sorry for my bad english.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lucas</title>
		<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-43424</link>
		<dc:creator>lucas</dc:creator>
		<pubDate>Wed, 23 Jul 2008 06:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-43424</guid>
		<description>it would be better to have html and php extensions skipped using a condition yet still allow querystrings. but more importantly to use one rule to replace underscores and loop it with the N flag instead of trying to anticipate how many there&#039;ll be. this version addresses those issues and trims consecutive underscores to a single hyphen.

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
 
RewriteCond %{REQUEST_URI} !\.(html&#124;php)($&#124;\?) [NC]
RewriteRule ^([^_]*)_+(.*)$ $1-$2 [E=underscores:Yes,N]
RewriteCond %{ENV:underscores} ^Yes$
RewriteRule (.*) http://%{HTTP_HOST}/$1 [R=301,L]</description>
		<content:encoded><![CDATA[<p>it would be better to have html and php extensions skipped using a condition yet still allow querystrings. but more importantly to use one rule to replace underscores and loop it with the N flag instead of trying to anticipate how many there&#8217;ll be. this version addresses those issues and trims consecutive underscores to a single hyphen.</p>
<p>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /</p>
<p>RewriteCond %{REQUEST_URI} !\.(html|php)($|\?) [NC]<br />
RewriteRule ^([^_]*)_+(.*)$ $1-$2 [E=underscores:Yes,N]<br />
RewriteCond %{ENV:underscores} ^Yes$<br />
RewriteRule (.*) http://%{HTTP_HOST}/$1 [R=301,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-43134</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Tue, 15 Jul 2008 07:21:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-43134</guid>
		<description>Haven&#039;t be able to get this to work, and I&#039;ve tried all of the variations in the two further reading links.

I have the file extensions removed on the old site and on the new, so all I really need to do is rewrite the underscores to dashes.

Love to know where I&#039;m going wrong but not being a tech, I don&#039;t really know where toe start.

PS At the moment I&#039;m testing on a local wamp setup before I go messing around with a live environment.</description>
		<content:encoded><![CDATA[<p>Haven&#8217;t be able to get this to work, and I&#8217;ve tried all of the variations in the two further reading links.</p>
<p>I have the file extensions removed on the old site and on the new, so all I really need to do is rewrite the underscores to dashes.</p>
<p>Love to know where I&#8217;m going wrong but not being a tech, I don&#8217;t really know where toe start.</p>
<p>PS At the moment I&#8217;m testing on a local wamp setup before I go messing around with a live environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Faruk</title>
		<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-39732</link>
		<dc:creator>Faruk</dc:creator>
		<pubDate>Thu, 24 Apr 2008 00:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-39732</guid>
		<description>&lt;strong&gt;Hello can anyone tell me how can i edit a htaccess multicommand file?i m currently using user friendly code and i added codes for broken links and code for fclearing query_strings
but at the and it did not work:&lt;/strong&gt;

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /friendly_url.php 


ErrorDocument 400 http://www.&lt;a href=&quot;http://www.sicaktakip.com&quot; rel=&quot;nofollow&quot;&gt;sicaktakip&lt;/a&gt;/error_404.html
ErrorDocument 401 http://www.sicaktakip/error_404.html
ErrorDocument 403 http://www.sicaktakip/error_404.html
ErrorDocument 404 http://www.sicaktakip/error_404.html
ErrorDocument 500/http://www.sicaktakip/index.php
RewriteCond %{QUERY_STRING} ^source= RewriteRule (.*) /$1? [R=301,L]
Anyone any idea for that?</description>
		<content:encoded><![CDATA[<p><strong>Hello can anyone tell me how can i edit a htaccess multicommand file?i m currently using user friendly code and i added codes for broken links and code for fclearing query_strings<br />
but at the and it did not work:</strong></p>
<p>RewriteEngine On<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /friendly_url.php </p>
<p>ErrorDocument 400 http://www.<a href="http://www.sicaktakip.com" rel="nofollow">sicaktakip</a>/error_404.html<br />
ErrorDocument 401 http://www.sicaktakip/error_404.html<br />
ErrorDocument 403 http://www.sicaktakip/error_404.html<br />
ErrorDocument 404 http://www.sicaktakip/error_404.html<br />
ErrorDocument 500/http://www.sicaktakip/index.php<br />
RewriteCond %{QUERY_STRING} ^source= RewriteRule (.*) /$1? [R=301,L]<br />
Anyone any idea for that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-36067</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Wed, 13 Feb 2008 21:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html#comment-36067</guid>
		<description>Hi - Great resource. At the risk of sounding ignorant, could you please tell me where abouts (i.e. in which directory/folder/subdirectory I would place this code to ensure the rewrite to dashes works? Thanks</description>
		<content:encoded><![CDATA[<p>Hi &#8211; Great resource. At the risk of sounding ignorant, could you please tell me where abouts (i.e. in which directory/folder/subdirectory I would place this code to ensure the rewrite to dashes works? Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
