<?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>Bhupendra Kunwar Blog &#124; Internet Marketing Web Dev Professional &#187; URL Rewriting</title>
	<atom:link href="http://www.bhupendra.info/blog/url-rewriting/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bhupendra.info/blog</link>
	<description>Re-Writing the Web</description>
	<lastBuildDate>Sat, 09 Jul 2011 07:17:39 +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>Canonical URL solution &#8211; redirect non-www to www and index.php to your homepage</title>
		<link>http://www.bhupendra.info/blog/redirect-index-html-and-index-php-to-the-homepage</link>
		<comments>http://www.bhupendra.info/blog/redirect-index-html-and-index-php-to-the-homepage#comments</comments>
		<pubDate>Thu, 08 Jul 2010 06:18:14 +0000</pubDate>
		<dc:creator>Bhupendra</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[URL Rewriting]]></category>
		<category><![CDATA[Webmaster Issues]]></category>

		<guid isPermaLink="false">http://www.bhupendra.info/blog/?p=168</guid>
		<description><![CDATA[Canonical URL issue has always been a headache to the Webmasters and SEOs. But thanks to apache&#8217;s mod_rewrite which provide nice escapes for this problem 1. Rewrite all your urls WITHOUT www to WITH www Options +FollowSymLinks RewriteEngine on RewriteCond &#8230; <a href="http://www.bhupendra.info/blog/redirect-index-html-and-index-php-to-the-homepage">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Canonical URL issue has always been a headache to the Webmasters and SEOs. But thanks to apache&#8217;s mod_rewrite which provide nice escapes for this problem</p>
<p><strong>1. Rewrite all your urls WITHOUT www to WITH www</strong></p>
<pre class="brush:ps">Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^euttaranchal.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
</pre>
<p><strong>2. Redirect all your index.php and index.html files to homepage or directory root</strong></p>
<pre class="brush:ps">Options +FollowSymLinks
RewriteEngine on

#rewrite your index.html to homepage
#eg:  http://www.yourdomain.com/index.html to http://www.yourdomain.com/

RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.yourdomain.com/$1 [R=301,L]

#rewrite your index.php to homepage
#eg: http://www.yourdomain.com/index.php to http://www.yourdomain.com/
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.yourdomain.com/$1 [R=301,L]
</pre>
<p>** you can do this for default.html or other pages too depending on your default page name.</p>
<img src="http://www.bhupendra.info/blog/?ak_action=api_record_view&id=168&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.bhupendra.info/blog/redirect-index-html-and-index-php-to-the-homepage/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>URL Rewriting with .htaccess</title>
		<link>http://www.bhupendra.info/blog/url-rewriting-with-htaccess</link>
		<comments>http://www.bhupendra.info/blog/url-rewriting-with-htaccess#comments</comments>
		<pubDate>Mon, 21 Jan 2008 15:13:52 +0000</pubDate>
		<dc:creator>Bhupendra</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[URL Rewriting]]></category>

		<guid isPermaLink="false">http://www.bhupendrakunwar.com/url-rewriting-with-htaccess/</guid>
		<description><![CDATA[A quick guide to URL Rewriting #Start URL Rewriting Options +FollowSymLinks RewriteEngine on #This will rewrite all non-www urls with www # ie http://example.com will be rewritten as http://www.example.com RewriteCond %{HTTP_HOST} ^example.com RewriteRule (.*) http://www.example.com/$1 [R=301,L] #This statement ReDirects all &#8230; <a href="http://www.bhupendra.info/blog/url-rewriting-with-htaccess">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A quick guide to URL Rewriting</p>
<p><code>#Start URL Rewriting</code></p>
<p><code>Options +FollowSymLinks<br />
RewriteEngine on</code></p>
<p><code>#This will rewrite all non-www urls with www<br />
# ie http://example.com will be rewritten as http://www.example.com</code></p>
<p><code>RewriteCond %{HTTP_HOST} ^example.com</code></p>
<p><code>RewriteRule (.*) http://www.example.com/$1 [R=301,L]</code></p>
<p><code>#This statement ReDirects all urls with trailing / to urls without trailing slash</code></p>
<p><code>RewriteRule ^([_a-zA-Z0-9-]+)/+$ /$1 [R]</code></p>
<p><code>#This statement ReWrites all urls of the form http://www.example.com/?blog.php?ID=xx as http://www.example.com/xx</code></p>
<p><code>RewriteRule ^([_a-zA-Z0-9-]+)+$ /blog.php?ID=$1</code></p>
<p><code>#END URL Rewriting</code></p>
<img src="http://www.bhupendra.info/blog/?ak_action=api_record_view&id=34&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.bhupendra.info/blog/url-rewriting-with-htaccess/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>htaccess cheat sheet</title>
		<link>http://www.bhupendra.info/blog/htaccess-cheat-sheet</link>
		<comments>http://www.bhupendra.info/blog/htaccess-cheat-sheet#comments</comments>
		<pubDate>Thu, 03 May 2007 06:36:27 +0000</pubDate>
		<dc:creator>Bhupendra</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[URL Rewriting]]></category>

		<guid isPermaLink="false">http://www.bhupendrakunwar.com/htaccess-cheat-sheet/</guid>
		<description><![CDATA[1. Rewrite All URLs on one domain to new domain Put the following code in the .htaccess file of your old domain Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] 2. Rewrite non-www urls with www Options +FollowSymLinks RewriteEngine on &#8230; <a href="http://www.bhupendra.info/blog/htaccess-cheat-sheet">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>1. Rewrite All URLs on one domain to new domain</strong></p>
<p>Put the following code in the .htaccess file of your old domain<br />
<code><br />
Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]</code></p>
<p><strong>2. Rewrite non-www urls with www</strong></p>
<p><code>Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^example.com<br />
RewriteRule (.*) http://www.example.com/$1 [R=301,L]</code></p>
<img src="http://www.bhupendra.info/blog/?ak_action=api_record_view&id=41&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.bhupendra.info/blog/htaccess-cheat-sheet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

