Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Silent redirection in LightTPD

Posted on 2011-10-24
4
Medium Priority
?
568 Views
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"] =~ "(example.com)" {
    url.redirect = ( "^/mydata(.*)" => "http://example.com:8000/index.php$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
 http://example.com/mydata?param1=123¶m2=456

and have PHP do the URL parsing?

Thanks
BT
0
Comment
Question by:brothertom
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:NetExpert-Warszawa
ID: 37064381
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.
0
 

Author Comment

by:brothertom
ID: 37064421
Thanks for your response - can you point me to a suitable reverse proxy conf example for Lighty?

0
 
LVL 10

Accepted Solution

by:
NetExpert-Warszawa earned 2000 total points
ID: 37064748
0
 

Author Closing Comment

by:brothertom
ID: 37110996
Many thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

575 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