1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.htaccess => lighttpd config

Discussion in 'Apache' started by col, Nov 29, 2006.

  1. #1
    I'm in need of "translating" the following .htaccess file to code for lighttpd.conf.

    .httpd
    Code (Text):
    1.  
    2. Options +Indexes
    3. RewriteEngine on
    4. RewriteRule ^go-(.*)-(.*).html$ index.php?go=$1&id=$2 [L,NC]
    5. RewriteRule ^(.*)-(.*)-(.*).html$ index.php?go=$2&id=$3 [L,NC]
    6. RewriteRule ^([0-9]+)/[^/]+/([0-9]+)/$ index.php?go=subcat&id=$1&pageNum_pages=$2 [L,NC]
    7. RewriteRule ^([0-9]+)/.*$ index.php?go=subcat&id=$1 [L,NC]
    8.  
    I've been trying the following code in lighttpd.conf for the domain, but it's not working:
    Code (Text):
    1.  
    2. url.rewrite = ( "^go-(.*)-(,*).html$" => "index.php?go=$1&id=$2",
    3.                     "^(.*)-(.*)-(.*).html$" => "index.php?go=$2&id=$3",
    4.                     "^([0-9]+)/[^/]+/([0-9]+)/$" => "index.php?go=subcat&id=$1&pageNum_pages=$2",
    5.                     "^([0-9]+)/.*$" => "index.php?go=subcat&id=$1")
    6.  
    7.  
    Any suggestions?
     
    col, Nov 29, 2006 IP
  2. col

    col Peon

    Messages:
    618
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Nobody got a clue?
     
    col, Nov 30, 2006 IP
  3. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    can't you just create a .htaccess on the directory level itself?
     
    tanfwc, Nov 30, 2006 IP
  4. col

    col Peon

    Messages:
    618
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    As far as I know Lighttpd doesn't have support for .htaccess files. You have to make the settings directly in the server's config file.
     
    col, Nov 30, 2006 IP
  5. col

    col Peon

    Messages:
    618
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'll just follow up with the solution if anyone would have the same issue
    Code (Text):
    1.  
    2.         url.rewrite = ( "^/go-(.*)-(,*).html$" => "index.php?go=$1&id=$2",
    3.                         "^/(.*)-(.*)-(.*).html$" => "index.php?go=$2&id=$3",
    4.                         "^/([0-9]+)/[^/]+/([0-9]+)/$" => "index.php?go=subcat&id=$1&pageNum_pages=$2",
    5.                         "^/([0-9]+)/.*$" => "index.php?go=subcat&id=$1" )
    6.  
     
    col, Jan 5, 2007 IP