Silent redirection in LightTPD

Posted on 2011-10-24
Last Modified: 2012-08-13
At present, I translate part of the url into an action using standard 301 redirect.

From lightttpd.conf
$HTTP["host"] =~ "(" {
    url.redirect = ( "^/mydata(.*)" => "$1&type=mydata" )

This works fine except it relies on the client knowing what to do with the 301 header and of course two calls to the server.
Is it possible to accept the whole URL into a PHP script and break it appart there (but keeping the slash bit of the url)
e.g. call

and have PHP do the URL parsing?

Question by:brothertom
    LVL 10

    Expert Comment

    You can parse the request in PHP code. However consider configuring a reverse proxy in LightTPD. It will allow you to have both - one request for a client and a request format that your code like.

    Author Comment

    Thanks for your response - can you point me to a suitable reverse proxy conf example for Lighty?

    LVL 10

    Accepted Solution


    Author Closing Comment

    Many thanks

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now