Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

question on CGI module's url with mod_rewrite

by Anonymous Monk
on Dec 12, 2007 at 17:23 UTC ( [id://656674]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

hi, i have apache mod_rewrite rules like this:
    RewriteEngine On
    RewriteRule ^/$             /app R,L
    <Location /app>
        ProxyPass  http://example.com:8888/app
        ProxyPassReverse  http://example.com:8888/app
        ...
    </Location>
i am trying to get the absolute url such as /app/xyz/123 when requesting http://www.example.com/app/xyz/123 but using CGI's url() method $q->url(rewrite => 1, absolute => 1); gives me http://www.example.com:8888/app/xyz/123 instead. setting rewrite to false generate '/app' only. anyone knows the correct to do this? thanks!

Replies are listed 'Best First'.
Re: question on CGI module's url with mod_rewrite
by naChoZ (Curate) on Dec 12, 2007 at 19:40 UTC

    Quick example from the commandline...

    # perl -le 'use URI; my $url = URI->new("http://www.example.com/app/ +xyz/123"); print $url->path;' /app/xyz/123

    --
    naChoZ

    Therapy is expensive. Popping bubble wrap is cheap. You choose.

      argh. i wasn't thinking straight. thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://656674]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-24 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found