File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / lighttpd / doc / outdated / redirect.txt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 10:32:48 2013 UTC (10 years, 9 months ago) by misho
Branches: lighttpd, MAIN
CVS tags: v1_4_41p8, v1_4_35p0, v1_4_35, v1_4_33, HEAD
1.4.33

===============
URL Redirection
===============

--------------------
Module: mod_redirect
--------------------

:Author: Jan Kneschke
:Date: $Date: 2013/10/14 10:32:48 $
:Revision: $Revision: 1.1.1.1 $

:abstract:
  url redirection

.. meta::
  :keywords: lighttpd, redirect

.. contents:: Table of Contents

Description
===========

...

Options
=======

url.redirect
  redirects a set of URLs externally

  e.g. ::

    url.redirect = ( "^/show/([0-9]+)/([0-9]+)$" => "http://www.example.org/show.php?isdn=$1&page$2",
                     "^/get/([0-9]+)/([0-9]+)$"  => "http://www.example.org/get.php?isdn=$1&page$2" )

    # make a external redirect
    # from any www.host (with www.) to the host (without www.)
    $HTTP["host"] =~ "^www\.(.*)" {
      url.redirect = ( "^/(.*)" => "http://%1/$1" )
    }

Warning
=======

Do NOT use mod_redirect to protect specific urls, as the original url passed from the client
is matched against your rules, for example strings like "/abc/../xyz%2f/path".

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>