[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apache Redirection/rewriting (fwd)





Ok guys, thought some of you brainiacs could take a look at this. A guy I
work with at LPI is trying to do some funky stuff with Apache and
redirection. Instead of simple foo.html redirecting to bar.html, he's
wanting to redirect it to some cgi script and do some bizarre variable
substitutions. This isn't my boat, and definitely not my language. I told
him to email me the stuff, and I'd forward it.

Below is the examples of what he wants to do. Can he do this? Any
suggestions?

- Kara


<snip snip>
Kara,

This has me stumped. If you can help, I would be grateful.

Here's what I want to do:

http://www.somewhere.tld/$2.p[?$3]
              to
http://www.somewhere.tld/cgi-bin/p.py?s=$2[&$3]

Examples:

http://www.somewhere.tld/foo.p
           to
http://www.somewhere.tld/cgi-bin/p.py?s=foo

http://www.somewhere.tld/foo.p?a=1&b=2&c=3
           to
http://www.somewhere.tld/cgi-bin/p.py?s=foo&a=1&b=1&c=3

http://www.somewhere.tld/subdir/foo.p?bar=foobar
           to
http://www.somewhere.tld/cgi-bin/p.py?s=subdir/foo&bar=foobar

Is this possible? Thanks.

-Scott


--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.