<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>ProDevTips - Latest Comments in MODx htaccess problems and solutions</title><link>http://prodevtips.disqus.com/</link><description>Mainly tutorials and tips relating to web development with PHP, Javascript, jQuery and Ruby</description><atom:link href="https://prodevtips.disqus.com/modx_htaccess_problems_and_solutions/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 17 Sep 2008 04:40:25 -0000</lastBuildDate><item><title>Re: MODx htaccess problems and solutions</title><link>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/#comment-2395515</link><description>&lt;p&gt;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 ' : ' and ' . ' in order to make them as regular string characters)&lt;/p&gt;&lt;p&gt;Patterns&lt;br&gt;1. (.*)&lt;br&gt;2. ^/?(.*)$&lt;/p&gt;&lt;p&gt;Parts of the Patterns&lt;br&gt;1a. (.*)&lt;/p&gt;&lt;p&gt;2a. ^&lt;br&gt;2b. /?&lt;br&gt;2c. (.*)&lt;br&gt;2d. $&lt;/p&gt;&lt;p&gt;#1 is more general than #2.&lt;/p&gt;&lt;p&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 '/stringy'. #1 would substitute '/stringy' as '&lt;a href="http://example.com//stringy'" rel="nofollow noopener" target="_blank" title="http://example.com//stringy'"&gt;http://example.com//stringy'&lt;/a&gt; while #2 as '&lt;a href="http://example.com/stringy'" rel="nofollow noopener" target="_blank" title="http://example.com/stringy'"&gt;http://example.com/stringy'&lt;/a&gt;. But if I had something like 'stringy', both would turn out to be '&lt;a href="http://example.com/stringy'" rel="nofollow noopener" target="_blank" title="http://example.com/stringy'"&gt;http://example.com/stringy'&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andy</dc:creator><pubDate>Wed, 17 Sep 2008 04:40:25 -0000</pubDate></item><item><title>Re: MODx htaccess problems and solutions</title><link>http://www.prodevtips.com/2008/08/03/modx-htaccess-problems-and-solutions/#comment-1494428</link><description>&lt;p&gt;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;/p&gt;&lt;p&gt;I am not too sure what the differences are..&lt;/p&gt;&lt;p&gt;Your edited one is:&lt;br&gt;RewriteRule ^/?(.*)$ "http\:\/\/asiandivingvacation\.com\/$1" [R=301,L]&lt;/p&gt;&lt;p&gt;While the one packaged with MODx is:&lt;br&gt;RewriteRule (.*) &lt;a href="http://www.example-domain-please-change.com/$1" rel="nofollow noopener" target="_blank" title="http://www.example-domain-please-change.com/$1"&gt;http://www.example-domain-p...&lt;/a&gt; [R=301,L]&lt;/p&gt;&lt;p&gt;You can see that they are slightly different, not sure which one is "better".&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zeca</dc:creator><pubDate>Mon, 04 Aug 2008 07:22:57 -0000</pubDate></item></channel></rss>