Talk:Mod rewrite
From DreamHost
I just spent the last hour struggling with my .htaccess file trying to access my stats page from the DreamHost panel. Because I have Drupal 4.6.5 installed on my domain, it took me a while to get the .htaccess file written correctly to pass through to the stats page. Drupal 4.6.5 is a bit different than earlier versions of Drupal, so you have to sort of play with it to make it work.
At the bottom of the Drupal .htaccess file, you'll find that writing the following, just before the end/if tag will work:
# Rewrite URLs for Drupal on DreamHost to get stats
# Rewrite URLs of the form 'index.php?q=x':
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]
</IfModule>
I also had to go into the DreamHost panel and give the user a password (so I could be sure I was actually entering the correct password) to make it work. Now, I can get to my stats from the DreamHost control panel, and Drupal 4.6.5 passes the correct pages out to the browser. --The Evil Queen 17:57, 17 Jan 2006 (PST)
er duh ignore my note if its retained anywhere...I goofed !Embeddedrf 23:36, 20 Aug 2006 (PDT)embeddedrf
Since I did not start this page and someone seems to take ownership ( a good thing ) I thought I would try the method of suggesting a few additions instead of hauling off and just adding. Pay heed as I am a newbie at anything I do so anything I suggest will generally be things that others will either question or have doubt about at some point.
Observations ( from my own experimenting...would be nice to be able to just read it! )
1) specify that mod_rewrite can be done on a per directory basis
2) do you mind if I add a link to a fresh page showing another example for the .htaccess file ? These things appear arcane when you come in fresh as I am not really familiar with Apache,mod_rewrite. For this reason an extra example would not hurt..
well lemme know what you think. If you do not silence means approval as the REM song goes..... Embeddedrf 23:36, 20 Aug 2006 (PDT)embeddedrf

