Results 1 to 2 of 2

Thread: Clean URLs

  1. #1
    Join Date
    Oct 2004
    Location
    LA, CA
    Posts
    1,069

    Clean URLs

    Just wondering, is the code the same to make clean URLs for both Apache and lighttpd? All I would have to do is change the rewrite rules for both, but I can use one class for both, right? Thanks.

  2. #2
    Join Date
    Nov 2001
    Location
    Vancouver
    Posts
    2,422
    lighttpd syntax for regex is similar. Here's a snippet from my lighttpd.conf:

    Code:
    $HTTP["host"] =~ "xyz.com" {
    # I use the variable feature of lighttpd configuration to factor out common account settings into just a few files, and add only customizations following
        var.accountname = "xyz"
        include "lighttpd/inc-docroot.conf"
    # snip other stuff
    
       url.rewrite = (
            "^(/foo\?category=.*)$" => "/tags/$1",
            "^/categories/(.*)/(.*)\.html$" => "/tags/$1/$2.html",
       )
    }
    “Even those who arrange and design shrubberies are under
    considerable economic stress at this period in history.”

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •