Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8096659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:31:26+00:00 2026-06-05T21:31:26+00:00

Initially i wanted to add trailing / in my url (lighttpd) which is possible

  • 0

Initially i wanted to add trailing / in my url (lighttpd)

which is possible to do with

    url.redirect = ( "^(.*[^/])$" => "$1/" ) 

Now i need to exclude some extensions like .txt, png etc. I want to add trailing slash for everything except those extensions, i dont seem to get that working.

In apache I could have used conditional rewrite, how would you do that in lighttpd.

Any directions would be highly appreciated.

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:31:27+00:00Added an answer on June 5, 2026 at 9:31 pm

    Just to make it together this would work (tested)

           $HTTP["url"] !~ "^(.*)(\..{3}|/)$" {
              url.redirect = (
    
               "^(.*[^/])$" => "$1/"
              )
            }
    

    @david This would create never ending loop…..

     "^(.*)\.(png|txt)$" => "$1.$2",
        "^(.*[^/])$" => "$1/"
    

    This will create ever lasting loop

    @Matthew This wont quite work as you are pushing everything to %1

    $HTTP["url"] !~ "^(.*)(\..{3}|/)$" {
      url.redirect = (
        ".*" => "%1/" 
      )
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to add a table and a foreign key to that table. Initially
Initially I wanted a checkmark where the text is placed on the left of
I've initially had two branches: master A---B---C \ fork D---E---F---H---I So I wanted to
Initially I've tried to find possible ways to do HLS segmenting on other non-Mac
I wanted to add an Xcode project to an existing repository using the following:
In my app I have a 4x2 Widget and now I wanted a second
I've got some trouble with a git setup I wanted to use in our
Initially, after upgrading to ASP.Net 4.0, I was receiving request validation errors, which I
just wanted to ask where I define initial class properties? From other languages I
Initial Question Yesterday i read about ECMAScript 5 Object.create() And I wanted to start

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.