Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By chx on
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
Comments
infinite internal redirect loop
Thanks for this hint! It stops hours of desperate search.
Nice.
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.
Ten years later, this is
Ten years later, this is STILL the best answer on the web. THANK YOU. Here's what finally worked for me:
In httpd.conf:
In .htaccess: