Clean URLs with VirtualDocumentRoot

chx - May 30, 2004 - 17:30

Welcome,

if you are using the vhost_alias_module and you want clean URLs, the default .htaccess will give you an infinite internal redirect loop. Two things shall be done to prevent this. Let's suppose that the DocumentRoot is /var/www/htdocs and drupal is installed in /var/www/htdocs/mydomain/drupal . In this case, the first thing is:

RewriteBase /mydomain/drupal/

This is easy to figure out. Second -- this took me some time -- you should add a slash before the index.php in the RewriteRule line:

RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

Karoly Negyesi

infinite internal redirect loop

mani - July 3, 2004 - 16:51

Thanks for this hint! It stops hours of desperate search.

        \ | /
         @-@  Mani
----oOO--(_)--OOo-----

Nice.

cwells - March 7, 2009 - 23:07

Wow, I know this is from May 2004 - but it just saved me a big headache, I think.

So, not to dredge up something from 5 years ago... but why isn't this in the default .htaccess file in D6?

.cw.

 
 

Drupal is a registered trademark of Dries Buytaert.