[support] Enabling Clean URLs in 6.19

Rich Shepard rshepard at appl-ecosys.com
Sun Sep 5 18:19:49 UTC 2010


On Sun, 5 Sep 2010, Don wrote:

>  I usually have to make 2 changes in my httpd.conf file on a new install
> to get clean urls to work. The directions linked to on the page work well,
> ask if you get stuck.

Don,

   This is a local (private) installation so I can learn Drupal and build my
new site before transferring everything to the live server.

   In /etc/httpd/httpd.conf is the line:

LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so

so that seems to be enabled for the server.

   In /var/www/htdocs/drupal-sqlite/.htaccess I see:

<IfModule mod_rewrite.c>
   RewriteEngine on

   # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
   # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

   # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
   # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

   # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_URI} !=/favicon.ico
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

   Should any of the above be changed?

   Guidance appreciated.

Rich


More information about the support mailing list