[documentation] [task] Clean URLs on other webservers- How to move valuable comments to their own webpage

Amazon drupal-docs at drupal.org
Sun Jan 8 01:48:38 UTC 2006


Issue status update for 
http://drupal.org/node/43781
Post a follow up: 
http://drupal.org/project/comments/add/43781

 Project:      Documentation
 Version:      <none>
 Component:    Installation
 Category:     tasks
 Priority:     critical
 Assigned to:  Anonymous
 Reported by:  Amazon
 Updated by:   Amazon
 Status:       active

The following comments were valuable and should be moved to a child page
on Clean URLs.


http://drupal.org/node/15365#comment-44471
http://drupal.org/node/15365#comment-71124
http://drupal.org/node/15365#comment-46976


Microsoft Internet Services Server
Windows ISS MySQL PHP(WIMP)-Tips for Configuring Drupal on WIMP [1]


Lighttpd
For those who have stepped up a notch in performance and moved from
Apache to Lighttpd [2], you can use the following configuration for
Lighty's mod_rewrite module:


url.rewrite-final = (
  "^/system/test/(.*)$" => "/index.php?q=system/test/$1",
  "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
  "^/([^.?]*)$" => "/index.php?q=$1"
)


The first line ensures that Drupal's clean URL check (when saving
Settings) succeeds (Drupal makes an HTTP request for a path of the form
//system/test/yLgnwqqUu5cWnvPi4Hrz.png/). It's a special case that must
be handled separately (read on for the reason).


The two following lines let Drupal handle any URL that *doesn't contain
a dot*. This is significant because we can assume, fairly confidently,
that addresses like //node/add/ are Drupal URLs, but addresses such as
//themes/bluemarine/style.css/ are physical files. So the above
configuration will work for all cases where this assumption holds true;
if there are exceptions to the rule, they can be manually added to the
rewrite configuration.


See also the related discussion at http://drupal.org/node/20766


I just successfully set up lighttpd 1.4.8 with php4 via fastcgi using
those rules above.
As per lighttpd documentation [3] I also set up /etc/php4/cgi/php.ini
to have that cgi fix. Then I added those rewrite rules for
corresponding virtual_host. 



* Ubuntu breezy's php4-cgi package [4]
* bougyman's lighttpd package (see http://www.lighttpd.net/download/
for details)

[1] http://drupal.org/node/27141
[2] http://www.lighttpd.net/
[3] http://www.lighttpd.net/documentation/fastcgi.html#configuring-php
[4] http://packages.ubuntu.com/breezy/web/php4-cgi




Amazon



More information about the documentation mailing list