PDA

View Full Version : lighttpd-1.4.22 (ssl) and ReWriteEngine


Rgarrett
7th April 2009, 14:40
Hey all,

I currently have a apache 2.2.11 running with a .htaccess file that has some rewrite setting. They are as follows.
RewriteEngine On

# Announcements
RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+\.html$ ./announcements.php?id=$1 [L,NC]
RewriteRule ^announcements$ ./announcements.php [L,NC]

# Downloads
RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^downloads$ ./downloads.php [L,NC]

# Knowledgebase
RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ ./knowledgebase.php?action=displayarticle&id=$1 [L,NC]
RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC]

Now in my never ending attempt to get lighttpd to act as my apache i have read up on the differences between apache and lighttpd and how they handle rewrite. I imported the same gettings as the .htacess into my lighttpd.conf file as below
url.rewrite = (
"^/knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$" => "/knowledgebase.php?action=displayarticle&id=$1 [L,NC]",

"^/knowledgebase/([0-9]+)/([^/]*)$" => "/knowledgebase.php?action=displaycat&catid=$1 [L,NC]",

"^/knowledgebase$" => "/knowledgebase.php [L,NC]",
)

but when I try and access the url I get a file not found. So when i stop lighttpd and start apache it works as it should.

Any idea?

falko
8th April 2009, 12:43
Are there any errors in the lighttpd logs?