You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Michael D. Berger" <m....@ieee.org> on 2005/06/04 06:23:28 UTC
[users@httpd] Newbie CGI: nested href
I wrote a CGI that opens an html file, reads it and sends
it out (with some modification). Now these files contain
relative links of the form:
<a href="someFile.html">something</a>
Now when the client clicks on "something", only the relative
paths appear to the CGI, and I cannot open the file.
What should I do?
1. I could carry the last path in a cookie and construct
the full path. But this would only work for nodes
that accept cookies.
2. I could change all the paths to absolute. Much much
work.
Any better suggestions?
Thanks in advance.
Mike.
--
Michael D. Berger
m.d.berger@ieee.org
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Newbie CGI: nested href
Posted by "Michael D. Berger" <m....@ieee.org>.
Indeed, one "non-standard" link had to be corrected.
Later I'll run find...grep to check for other problems.
Mike.
--
Michael D. Berger
m.d.berger@ieee.org
> -----Original Message-----
> From: Dan Mahoney, System Admin [mailto:danm@prime.gushi.org]
> Sent: Saturday, June 04, 2005 10:37 AM
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] Newbie CGI: nested href
>
>
> On Sat, 4 Jun 2005, Michael D. Berger wrote:
>
> > Problem solved by pathcing the href in the outgoing response.
> > Mike.
>
> It was either that, or come up with some complex mod_rewrite
> answer so
> your users wouldn't see the cgi url but rather the url of
> some page. I
> figured just tweaking the links (as long as you knew their
> style to be
> consistent) was easiest, even if it's not the "correct" answer.
>
> -Dan
>
> >
> > --
> > Michael D. Berger
> > m.d.berger@ieee.org
> >
> >> -----Original Message-----
> >> From: Michael D. Berger [mailto:m.d.berger@ieee.org]
> >> Sent: Saturday, June 04, 2005 12:34 AM
> >> To: users@httpd.apache.org
> >> Subject: RE: [users@httpd] Newbie CGI: nested href
> >>
> >>
> >> I have a legacy tree with numerous branches, and many
> relative links.
> >> I was hoping to get it all with one CGI.
> >> Mike.
> >>
> >> --
> >> Michael D. Berger
> >> m.d.berger@ieee.org
> >>
> >>> -----Original Message-----
> >>> From: Dan Mahoney, System Admin [mailto:danm@prime.gushi.org]
> >>> Sent: Saturday, June 04, 2005 12:32 AM
> >>> To: Apache-Users
> >>> Subject: Re: [users@httpd] Newbie CGI: nested href
> >>>
> >>>
> >>> On Sat, 4 Jun 2005, Michael D. Berger wrote:
> >>>
> >>> Try putting the cgi in the same directory as the html file
> >>> and turning on
> >>> execCGI in that directory? That's the easy answer. I
> >>> suppose there's
> >>> something harder involving mod_rewrite.
> >>>
> >>> But since you're parsing the html anyway, you could rewrite
> >>> them on the
> >>> fly, too.
> >>>
> >>> Your call.
> >>>
> >>>
> >>>> I wrote a CGI that opens an html file, reads it and sends
> >>>> it out (with some modification). Now these files contain
> >>>> relative links of the form:
> >>>> <a href="someFile.html">something</a>
> >>>> Now when the client clicks on "something", only the relative
> >>>> paths appear to the CGI, and I cannot open the file.
> >>>>
> >>>> What should I do?
> >>>> 1. I could carry the last path in a cookie and construct
> >>>> the full path. But this would only work for nodes
> >>>> that accept cookies.
> >>>>
> >>>> 2. I could change all the paths to absolute. Much much
> >>>> work.
> >>>>
> >>>> Any better suggestions?
> >>>>
> >>>> Thanks in advance.
> >>>> Mike.
> >>>>
> >>>>
> >>>> --
> >>>> Michael D. Berger
> >>>> m.d.berger@ieee.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>
> ---------------------------------------------------------------------
> >>>> The official User-To-User support forum of the Apache HTTP
> >>> Server Project.
> >>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
> >>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >>>> " from the digest: users-digest-unsubscribe@httpd.apache.org
> >>>> For additional commands, e-mail: users-help@httpd.apache.org
> >>>>
> >>>
> >>> --
> >>>
> >>> [23:49:00] LarpGM: Did my little TP comment scare you off?
> >>> [23:49:22] ilzarion: no, the shrieking retarded child eating
> >>> people did
> >>>
> >>> -Feb 06, 2001, times apparent.
> >>>
> >>>
> >>> --------Dan Mahoney--------
> >>> Techie, Sysadmin, WebGeek
> >>> Gushi on efnet/undernet IRC
> >>> ICQ: 13735144 AIM: LarpGM
> >>> Site: http://www.gushi.org
> >>> ---------------------------
> >>>
> >>>
> >>>
> >>
> ---------------------------------------------------------------------
> >>> The official User-To-User support forum of the Apache HTTP
> >>> Server Project.
> >>> See <URL:http://httpd.apache.org/userslist.html> for more info.
> >>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >>> " from the digest: users-digest-unsubscribe@httpd.apache.org
> >>> For additional commands, e-mail: users-help@httpd.apache.org
> >>>
> >>>
> >>
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> The official User-To-User support forum of the Apache HTTP
> >> Server Project.
> >> See <URL:http://httpd.apache.org/userslist.html> for more info.
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> " from the digest: users-digest-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >>
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP
> Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > " from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> --
>
> "What's with the server farm down in the basement?"
>
> -Spider, Three Skulls Commons at Selden House, 4/15/00
>
> --------Dan Mahoney--------
> Techie, Sysadmin, WebGeek
> Gushi on efnet/undernet IRC
> ICQ: 13735144 AIM: LarpGM
> Site: http://www.gushi.org
> ---------------------------
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Newbie CGI: nested href
Posted by "Dan Mahoney, System Admin" <da...@prime.gushi.org>.
On Sat, 4 Jun 2005, Michael D. Berger wrote:
> Problem solved by pathcing the href in the outgoing response.
> Mike.
It was either that, or come up with some complex mod_rewrite answer so
your users wouldn't see the cgi url but rather the url of some page. I
figured just tweaking the links (as long as you knew their style to be
consistent) was easiest, even if it's not the "correct" answer.
-Dan
>
> --
> Michael D. Berger
> m.d.berger@ieee.org
>
>> -----Original Message-----
>> From: Michael D. Berger [mailto:m.d.berger@ieee.org]
>> Sent: Saturday, June 04, 2005 12:34 AM
>> To: users@httpd.apache.org
>> Subject: RE: [users@httpd] Newbie CGI: nested href
>>
>>
>> I have a legacy tree with numerous branches, and many relative links.
>> I was hoping to get it all with one CGI.
>> Mike.
>>
>> --
>> Michael D. Berger
>> m.d.berger@ieee.org
>>
>>> -----Original Message-----
>>> From: Dan Mahoney, System Admin [mailto:danm@prime.gushi.org]
>>> Sent: Saturday, June 04, 2005 12:32 AM
>>> To: Apache-Users
>>> Subject: Re: [users@httpd] Newbie CGI: nested href
>>>
>>>
>>> On Sat, 4 Jun 2005, Michael D. Berger wrote:
>>>
>>> Try putting the cgi in the same directory as the html file
>>> and turning on
>>> execCGI in that directory? That's the easy answer. I
>>> suppose there's
>>> something harder involving mod_rewrite.
>>>
>>> But since you're parsing the html anyway, you could rewrite
>>> them on the
>>> fly, too.
>>>
>>> Your call.
>>>
>>>
>>>> I wrote a CGI that opens an html file, reads it and sends
>>>> it out (with some modification). Now these files contain
>>>> relative links of the form:
>>>> <a href="someFile.html">something</a>
>>>> Now when the client clicks on "something", only the relative
>>>> paths appear to the CGI, and I cannot open the file.
>>>>
>>>> What should I do?
>>>> 1. I could carry the last path in a cookie and construct
>>>> the full path. But this would only work for nodes
>>>> that accept cookies.
>>>>
>>>> 2. I could change all the paths to absolute. Much much
>>>> work.
>>>>
>>>> Any better suggestions?
>>>>
>>>> Thanks in advance.
>>>> Mike.
>>>>
>>>>
>>>> --
>>>> Michael D. Berger
>>>> m.d.berger@ieee.org
>>>>
>>>>
>>>>
>>>>
>>>
>> ---------------------------------------------------------------------
>>>> The official User-To-User support forum of the Apache HTTP
>>> Server Project.
>>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>
>>>
>>> --
>>>
>>> [23:49:00] LarpGM: Did my little TP comment scare you off?
>>> [23:49:22] ilzarion: no, the shrieking retarded child eating
>>> people did
>>>
>>> -Feb 06, 2001, times apparent.
>>>
>>>
>>> --------Dan Mahoney--------
>>> Techie, Sysadmin, WebGeek
>>> Gushi on efnet/undernet IRC
>>> ICQ: 13735144 AIM: LarpGM
>>> Site: http://www.gushi.org
>>> ---------------------------
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>>> The official User-To-User support forum of the Apache HTTP
>>> Server Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP
>> Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
--
"What's with the server farm down in the basement?"
-Spider, Three Skulls Commons at Selden House, 4/15/00
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Newbie CGI: nested href
Posted by "Michael D. Berger" <m....@ieee.org>.
Problem solved by pathcing the href in the outgoing response.
Mike.
--
Michael D. Berger
m.d.berger@ieee.org
> -----Original Message-----
> From: Michael D. Berger [mailto:m.d.berger@ieee.org]
> Sent: Saturday, June 04, 2005 12:34 AM
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] Newbie CGI: nested href
>
>
> I have a legacy tree with numerous branches, and many relative links.
> I was hoping to get it all with one CGI.
> Mike.
>
> --
> Michael D. Berger
> m.d.berger@ieee.org
>
> > -----Original Message-----
> > From: Dan Mahoney, System Admin [mailto:danm@prime.gushi.org]
> > Sent: Saturday, June 04, 2005 12:32 AM
> > To: Apache-Users
> > Subject: Re: [users@httpd] Newbie CGI: nested href
> >
> >
> > On Sat, 4 Jun 2005, Michael D. Berger wrote:
> >
> > Try putting the cgi in the same directory as the html file
> > and turning on
> > execCGI in that directory? That's the easy answer. I
> > suppose there's
> > something harder involving mod_rewrite.
> >
> > But since you're parsing the html anyway, you could rewrite
> > them on the
> > fly, too.
> >
> > Your call.
> >
> >
> > > I wrote a CGI that opens an html file, reads it and sends
> > > it out (with some modification). Now these files contain
> > > relative links of the form:
> > > <a href="someFile.html">something</a>
> > > Now when the client clicks on "something", only the relative
> > > paths appear to the CGI, and I cannot open the file.
> > >
> > > What should I do?
> > > 1. I could carry the last path in a cookie and construct
> > > the full path. But this would only work for nodes
> > > that accept cookies.
> > >
> > > 2. I could change all the paths to absolute. Much much
> > > work.
> > >
> > > Any better suggestions?
> > >
> > > Thanks in advance.
> > > Mike.
> > >
> > >
> > > --
> > > Michael D. Berger
> > > m.d.berger@ieee.org
> > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP
> > Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > " from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> >
> > --
> >
> > [23:49:00] LarpGM: Did my little TP comment scare you off?
> > [23:49:22] ilzarion: no, the shrieking retarded child eating
> > people did
> >
> > -Feb 06, 2001, times apparent.
> >
> >
> > --------Dan Mahoney--------
> > Techie, Sysadmin, WebGeek
> > Gushi on efnet/undernet IRC
> > ICQ: 13735144 AIM: LarpGM
> > Site: http://www.gushi.org
> > ---------------------------
> >
> >
> >
> ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP
> > Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > " from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: [users@httpd] Newbie CGI: nested href
Posted by "Michael D. Berger" <m....@ieee.org>.
I have a legacy tree with numerous branches, and many relative links.
I was hoping to get it all with one CGI.
Mike.
--
Michael D. Berger
m.d.berger@ieee.org
> -----Original Message-----
> From: Dan Mahoney, System Admin [mailto:danm@prime.gushi.org]
> Sent: Saturday, June 04, 2005 12:32 AM
> To: Apache-Users
> Subject: Re: [users@httpd] Newbie CGI: nested href
>
>
> On Sat, 4 Jun 2005, Michael D. Berger wrote:
>
> Try putting the cgi in the same directory as the html file
> and turning on
> execCGI in that directory? That's the easy answer. I
> suppose there's
> something harder involving mod_rewrite.
>
> But since you're parsing the html anyway, you could rewrite
> them on the
> fly, too.
>
> Your call.
>
>
> > I wrote a CGI that opens an html file, reads it and sends
> > it out (with some modification). Now these files contain
> > relative links of the form:
> > <a href="someFile.html">something</a>
> > Now when the client clicks on "something", only the relative
> > paths appear to the CGI, and I cannot open the file.
> >
> > What should I do?
> > 1. I could carry the last path in a cookie and construct
> > the full path. But this would only work for nodes
> > that accept cookies.
> >
> > 2. I could change all the paths to absolute. Much much
> > work.
> >
> > Any better suggestions?
> >
> > Thanks in advance.
> > Mike.
> >
> >
> > --
> > Michael D. Berger
> > m.d.berger@ieee.org
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP
> Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > " from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> --
>
> [23:49:00] LarpGM: Did my little TP comment scare you off?
> [23:49:22] ilzarion: no, the shrieking retarded child eating
> people did
>
> -Feb 06, 2001, times apparent.
>
>
> --------Dan Mahoney--------
> Techie, Sysadmin, WebGeek
> Gushi on efnet/undernet IRC
> ICQ: 13735144 AIM: LarpGM
> Site: http://www.gushi.org
> ---------------------------
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Newbie CGI: nested href
Posted by "Dan Mahoney, System Admin" <da...@prime.gushi.org>.
On Sat, 4 Jun 2005, Michael D. Berger wrote:
Try putting the cgi in the same directory as the html file and turning on
execCGI in that directory? That's the easy answer. I suppose there's
something harder involving mod_rewrite.
But since you're parsing the html anyway, you could rewrite them on the
fly, too.
Your call.
> I wrote a CGI that opens an html file, reads it and sends
> it out (with some modification). Now these files contain
> relative links of the form:
> <a href="someFile.html">something</a>
> Now when the client clicks on "something", only the relative
> paths appear to the CGI, and I cannot open the file.
>
> What should I do?
> 1. I could carry the last path in a cookie and construct
> the full path. But this would only work for nodes
> that accept cookies.
>
> 2. I could change all the paths to absolute. Much much
> work.
>
> Any better suggestions?
>
> Thanks in advance.
> Mike.
>
>
> --
> Michael D. Berger
> m.d.berger@ieee.org
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
--
[23:49:00] LarpGM: Did my little TP comment scare you off?
[23:49:22] ilzarion: no, the shrieking retarded child eating people did
-Feb 06, 2001, times apparent.
--------Dan Mahoney--------
Techie, Sysadmin, WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144 AIM: LarpGM
Site: http://www.gushi.org
---------------------------
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org