<?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"
	>
<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>Web Development</description>
	<pubDate>Sat, 30 Aug 2008 05:00:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<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'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 (.*) <a href="http://%" rel="nofollow">http://%</a>{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't be able to get this to work, and I'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'm going wrong but not being a tech, I don't really know where toe start.

PS At the moment I'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="http://www.sicaktakip.com" rel="nofollow"&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 <a href="http://www" rel="nofollow">http://www</a>.<a href="http://www.sicaktakip.com" rel="nofollow">sicaktakip</a>/error_404.html<br />
ErrorDocument 401 <a href="http://www.sicaktakip/error_404.html" rel="nofollow">http://www.sicaktakip/error_404.html</a><br />
ErrorDocument 403 <a href="http://www.sicaktakip/error_404.html" rel="nofollow">http://www.sicaktakip/error_404.html</a><br />
ErrorDocument 404 <a href="http://www.sicaktakip/error_404.html" rel="nofollow">http://www.sicaktakip/error_404.html</a><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 - 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>
