I wish I'd thought of adding a <BASE> tag to the template before I clicked "send" on that last post. Arrgh. Anyway, that is the simple solution.

Bruce

Bruce McKenzie wrote:
Hello,

I'm trying to rewrite some existing apps to take advantage of the convenience of CGI::Dispatch. I've run into a problem with the way relative URLs are resolved.

Say I want to use an app called 'cat.pl' to run the module "Contact" which has a default runmode of "test". This prints out a tt2 template containing a link:

"../../clients/act/act_demo.html"

Now, if I call the module in the canonical way,
    #!/usr/bin/perl
    use Contact;
    Contact->new->run;

the browser reads the relative url correctly:
    "http://localhost/public_html/clients/act/act_demo.html";

however, if I try to "dispatch" the module with a link constructed as follows:
 "http://localhost/public_html/cgi-bin/contacts/cat.pl/contact?ID=881";

the relative url in the template doesn't work -- I get:

    http://localhost/public_html/cgi-bin/clients/act/act_demo.html

I hope there's a really simple solution :-)

Bruce




---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



.


--
Bruce McKenzie
Business Information Graphics, Inc.
242 W. 36th Street
10th Floor
New York, NY 10018

v. 212-477-4288
http://www.2MinuteExplainer.com

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to