<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: MODx htaccess problems and solutions</title>
	<link>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/</link>
	<description>Dev related notes, tutorials and anecdotes</description>
	<pubDate>Sat, 22 Nov 2008 10:52:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Andy</title>
		<link>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/#comment-3593</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Wed, 17 Sep 2008 20:40:25 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/#comment-3593</guid>
		<description>Rewrite Rules&lt;br&gt;1. RewriteRule (.*) http://www.example.com/$1 [R=301,L]&lt;br&gt;2. RewriteRule ^/?(.*)$ http://www.example.com/$1 [R=301,L]&lt;br&gt;(notice that I only put forward slashes for the special characters &#39; : &#39; and &#39; . &#39; in order to make them as regular string characters)&lt;br&gt;&lt;br&gt;Patterns&lt;br&gt;1. (.*)&lt;br&gt;2. ^/?(.*)$&lt;br&gt;&lt;br&gt;Parts of the Patterns&lt;br&gt;1a. (.*)&lt;br&gt;&lt;br&gt;2a. ^&lt;br&gt;2b. /?&lt;br&gt;2c. (.*)&lt;br&gt;2d. $&lt;br&gt;&lt;br&gt;#1 is more general than #2.&lt;br&gt;&lt;br&gt;Basically, #1 says that everything will be put into the $1 of the following substitution argument. However, #2 says that everything will be into the $1, except for a forward slash( / ) regardless of whether that forward slash actually exists. This is a pretty subtle, but important distinction to make. Say for instance that I had something like &#39;/stringy&#39;. #1 would substitute &#39;/stringy&#39; as &#39;http://example.com//stringy&#39; while #2 as &#39;http://example.com/stringy&#39;. But if I had something like &#39;stringy&#39;, both would turn out to be &#39;http://example.com/stringy&#39;.</description>
		<content:encoded><![CDATA[<p>Rewrite Rules<br />1. RewriteRule (.*) <a href="http://www.example.com/1" rel="nofollow">http://www.example.com/1</a> [R=301,L]<br />2. RewriteRule ^/?(.*)$ <a href="http://www.example.com/1" rel="nofollow">http://www.example.com/1</a> [R=301,L]<br />(notice that I only put forward slashes for the special characters &#39; : &#39; and &#39; . &#39; in order to make them as regular string characters)</p>
<p>Patterns<br />1. (.*)<br />2. ^/?(.*)$</p>
<p>Parts of the Patterns<br />1a. (.*)</p>
<p>2a. ^<br />2b. /?<br />2c. (.*)<br />2d. $</p>
<p>#1 is more general than #2.</p>
<p>Basically, #1 says that everything will be put into the $1 of the following substitution argument. However, #2 says that everything will be into the $1, except for a forward slash( / ) regardless of whether that forward slash actually exists. This is a pretty subtle, but important distinction to make. Say for instance that I had something like &#39;/stringy&#39;. #1 would substitute &#39;/stringy&#39; as &#39;http://example.com//stringy&#39; while #2 as &#39;http://example.com/stringy&#39;. But if I had something like &#39;stringy&#39;, both would turn out to be &#39;http://example.com/stringy&#39;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeca</title>
		<link>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/#comment-1165</link>
		<dc:creator>Zeca</dc:creator>
		<pubDate>Mon, 04 Aug 2008 12:22:57 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/#comment-1165</guid>
		<description>Actually those two lines are included (slightly different) in the default htaccess file that is packaged with MODx but they are commented out so that you can choose the options that you want to use, with or without the www.&lt;br&gt;&lt;br&gt;I am not too sure what the differences are..&lt;br&gt;&lt;br&gt;Your edited one is:&lt;br&gt;RewriteRule ^/?(.*)$ "http://asiandivingvacation.com/$1" [R=301,L]&lt;br&gt;&lt;br&gt;While the one packaged with MODx is:&lt;br&gt;RewriteRule (.*) &lt;a href="http://www.example-domain-please-change.com/%241"&gt;http://www.example-domain-please-change.com/$1&lt;/a&gt; [R=301,L]&lt;br&gt;&lt;br&gt;You can see that they are slightly different, not sure which one is "better".</description>
		<content:encoded><![CDATA[<p>Actually those two lines are included (slightly different) in the default htaccess file that is packaged with MODx but they are commented out so that you can choose the options that you want to use, with or without the <a href="http://www." rel="nofollow">http://www.</a></p>
<p>I am not too sure what the differences are..</p>
<p>Your edited one is:<br />RewriteRule ^/?(.*)$ &#8220;http://asiandivingvacation.com/$1&#8243; [R=301,L]</p>
<p>While the one packaged with MODx is:<br />RewriteRule (.*) <a href="http://www.example-domain-please-change.com/%241">http://www.example-domain-please-change.com/1</a> [R=301,L]</p>
<p>You can see that they are slightly different, not sure which one is &#8220;better&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zeca</title>
		<link>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/#comment-1011</link>
		<dc:creator>Zeca</dc:creator>
		<pubDate>Mon, 04 Aug 2008 11:22:57 +0000</pubDate>
		<guid>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/#comment-1011</guid>
		<description>Actually those two lines are included (slightly different) in the default htaccess file that is packaged with MODx but they are commented out so that you can choose the options that you want to use, with or without the www.

I am not too sure what the differences are..

Your edited one is:
RewriteRule ^/?(.*)$ "http\:\/\/asiandivingvacation\.com\/$1" [R=301,L]

While the one packaged with MODx is:
RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]

You can see that they are slightly different, not sure which one is "better".</description>
		<content:encoded><![CDATA[<p>Actually those two lines are included (slightly different) in the default htaccess file that is packaged with MODx but they are commented out so that you can choose the options that you want to use, with or without the <a href="http://www." rel="nofollow">http://www.</a></p>
<p>I am not too sure what the differences are..</p>
<p>Your edited one is:<br />
RewriteRule ^/?(.*)$ &#8220;http\:\/\/asiandivingvacation\.com\/$1&#8243; [R=301,L]</p>
<p>While the one packaged with MODx is:<br />
RewriteRule (.*) <a href="http://www.example-domain-please-change.com/1" rel="nofollow">http://www.example-domain-please-change.com/1</a> [R=301,L]</p>
<p>You can see that they are slightly different, not sure which one is &#8220;better&#8221;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
