lighttpd-1.4.22 (ssl) and ReWriteEngine

Discussion in 'Server Operation' started by Rgarrett, Apr 7, 2009.

  1. Rgarrett

    Rgarrett New Member

    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

    Code:
    # 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
    Code:
    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?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Are there any errors in the lighttpd logs?
     

Share This Page