Project

General

Profile

Actions

Feature #237

closed

Rewrite conditions

Added by Anonymous over 19 years ago. Updated 12 months ago.

Status:
Fixed
Priority:
Normal
Category:
mod_rewrite
Target version:
-
ASK QUESTIONS IN Forums:
No

Description

I'd love to see support for rewrite conditions (If this file doesn't exist, then perform this rewrite, etc), similar to apache's RewriteCond Looks like it's back to Apache, for the time being...

-- pergesu

Actions #1

Updated by Anonymous over 19 years ago

To have a real alternative (and compatibility) to apache I think lighttpd should support exact mod_rewrites' syntax or (worse) should have a converter. Many big scripts use mod_rewrite by default, therefore lighttpd wouldn't support all features.

-- Moritz Augustin

Actions #2

Updated by Anonymous over 19 years ago

I second this wish. I'm currently evaluating if I can replace Apache by lighty - so far I'm very impressed, but the current missing thing is conditional rewrites.

-- Andreas Gohr

Actions #3

Updated by Anonymous over 19 years ago

I would also like to see this (what pergesu requested). With this feature I could almost totally replace Apache with Lighttpd.

-- BJ Clark

Actions #4

Updated by Anonymous about 19 years ago

I'd like to see this too, since this constraint keeps me from using lighty atm.

-- Albert Ramstedt

Actions #5

Updated by Anonymous almost 19 years ago

Although I agree it would be nice to have something that accomplishes the same thing as RewriteCond (although not exactly like Apache's mod_rewrite, which while really useful is also really, really ugly).

However, that being said, I don't see this as a show-stopper. The reason is that it's quite possible to write a 404.cgi that does this for you. Not as efficient as having the web server do it perhaps, but really, the application should be handling this IMO and a CGI-based solution seems a reasonable stop-gap.

Here's my $0.02: rewrite rules should be kept as simple and few as possible as they are nightmarish to maintain, non-portable (as you've discovered), and most important of all, they move application logic outside the application into a config file which is just plain bad style. Granted, many apps are written this way, but that's the application author's problem, not the web server's.

-- cliff

Actions #6

Updated by jan about 18 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

fixed in 1.4.12, use mod_magnet.

Actions #7

Updated by Anonymous about 18 years ago

  • Status changed from Fixed to Need Feedback
  • Resolution deleted (fixed)

Replying to jan:

fixed in 1.4.12, use mod_magnet.

hm, apache mod rewrite combat would be nicer ;-)

Actions #8

Updated by Anonymous over 17 years ago

I can't find any documentations about mod_magnet

-- masryalex

Actions #9

Updated by stbuehler over 16 years ago

  • Status changed from Need Feedback to Fixed
  • Resolution set to wontfix
Actions #10

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Wontfix
Actions #11

Updated by gstrauss 12 months ago

  • Description updated (diff)
  • Status changed from Wontfix to Fixed
  • ASK QUESTIONS IN Forums set to No

url.rewrite-if-not-file (added in lighttpd 1.4.25)

For more complex and arbitrary conditions, use mod_magnet and a short lua script.

Actions

Also available in: Atom