Uncomment RewriteBase in .htaccess

traxer - September 1, 2008 - 11:57
Project:Drupal
Version:7.x-dev
Component:usability
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

I think most of the Drupal installations run from a VirtualDocumentRoot. To help inexperienced administrators during the installation, it would be a good idea to uncomment the RewriteBase line in .htaccess. I've attached a patch that does this.

I am not totally happy with the modifications I made to the help text, though.

AttachmentSizeStatusTest resultOperations
Uncomment RewriteBase.patch877 bytesIdleFetch test file: failed to retrieve [Uncomment RewriteBase.patch] from project client.View details | Re-test

#1

traxer - September 1, 2008 - 12:02

Slightly better help text.

AttachmentSizeStatusTest resultOperations
Uncomment RewriteBase-1.patch943 bytesIdleFetch test file: failed to retrieve [Uncomment RewriteBase-1.patch] from project client.View details | Re-test

#2

Robin Monks - September 1, 2008 - 14:45

I've never had to use this option before, I would think this would make sites in subfolders much more complicated.

Robin

#3

traxer - September 1, 2008 - 15:50

Whether or not RewriteBase is required seems to depend on configuration options outside the .htaccess file. I know of three hosting providers that require RewriteBase to be set explicitly for Clean URLs to work, regardless of where you install Drupal. But I also heard of other hosting providers that do not require it. I'm confused.

#4

Robin Monks - September 1, 2008 - 16:02

I would much rather see better documentation in the event that Clean URL support cannot be detected by the installer.

-1 on changing .htaccess.

Robin

#5

traxer - September 2, 2008 - 15:23

+1 for better documentation

While the current documentation gives a thorough overview (if there is such a thing), my guess is that many users are overwhelmed by the number of pages on that topic.

However, before I say -1 to my original proposal, can anyone give an example Apache configuration where Drupal is installed in a subdirectory an Clean URLs work out of the box?

#6

maartenvg - September 2, 2008 - 17:03

Better documentation is always welcome, but isn't there something automatic we can do to improve the clean-url-activation? Like detecting VirtualDocumentRoot vs DocumentRoot and/or detecting whether we're in a subdirectory or not. And based on these detections, make suggestions to the user or even alter .htaccess?

#7

Robin Monks - September 2, 2008 - 18:01

I know this works out of the box on my setup on CentOS 5. I can get you a copy of the httpd.conf if you wish.

#8

traxer - September 2, 2008 - 19:31

Making suggestions to the user during installation: +1
Altering .htaccess during installation: -1 .htaccess must not be owned by the user who executes the webserver. Therefore, altering .htaccess during installation only serves test and development installations. I don't think it's a good Idea to add additional code for that case.

I can get you a copy of the httpd.conf if you wish.

Please do so.

#9

catch - November 19, 2008 - 00:29
Status:needs review» won't fix

I'm not aware of many support requests for this, so marking won't fix.

 
 

Drupal is a registered trademark of Dries Buytaert.