Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 15962 - redirect.apm should accept relative urls
redirect.apm should accept relative urls
Product: Red Hat Web Site
Classification: Red Hat
Component: Other (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lancaster
Paul Lindner
Depends On:
  Show dependency treegraph
Reported: 2000-08-10 19:05 EDT by Maraya Cornell
Modified: 2007-04-18 12:28 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-14 17:05:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Maraya Cornell 2000-08-10 19:05:29 EDT
redirect.apm requires full urls:

Won't accept:

This makes testing difficult, and I guarantees you that I will accidentally 
push files containing links to sassy.
Comment 1 Maraya Cornell 2000-08-10 19:09:08 EDT

redirect.apm requires:

Comment 2 Paul Lindner 2000-08-10 19:10:45 EDT

can you have a look at this script.

I suggest using localhost as a hostname and resetting this to the name of the

Comment 3 Tom Lancaster 2000-08-11 16:17:32 EDT
FIxed this. The script will now use the SERVER_NAME environment variable to
determine where relative links should go. For the time being it is assumed that
all relative links use the http protocol ( as opposed to ftp gopher, mailto ).
Comment 4 Maraya Cornell 2000-08-11 18:01:59 EDT
Mmmm. Can't seem to get this to work - it's just redirecting to home page. Maybe 
I'm using the wrong syntax? Can I have the *exact* string to use for the url?

Comment 5 Tom Lancaster 2000-08-11 18:34:00 EDT
I think some confusion resulted from the comments posted above.
Here's the syntax for doing a relative link:
<A HREF="/apps/redirect.apm/apps/response/myform.html">My Form</A>

This code will redirect you to /apps/response/myform.html on whatever server you
happen to be using.

If you want to tack parameters on the end, that's the same as before.
Comment 6 Maraya Cornell 2000-08-11 18:39:55 EDT
I think the problem may be that this is a drop-down form. That's why we need to 
redirect mod - so that you can choose a page from the drop-down field. The form 
tag is
<FORM NAME="selecter1" ACTION="/apps/redirect.apm" METHOD="GET">

I've tried both
<OPTION VALUE="/apps/redirect.apm/training/elearning/catalog/topic/c.html">
<OPTION VALUE="/training/elearning/catalog/topic/c.html">

but both just take me to the home page.
Comment 7 Tom Lancaster 2000-08-11 19:09:22 EDT
You're right. That was an oversight. I didn't see the difference between rhpage
and rhpath.
I've committed the new version. I'll push it live in a minute. Your code example
wouldn't work anyway, though. 
You need the following:
<form action="/apps/redirect.apm">
<select name="rhpath">
<option value="/apps/response/myform.html">

THe important bit being the select name of rhpath. This is what the script is
looking for.

Comment 8 Maraya Cornell 2000-08-14 16:54:52 EDT
Well, it's mostly working. It doesn't check for port numbers, though. In order 

to really test it in my sandbox, it would be nice if the correct port number 

could be passed through. 



(drop-down men
Comment 9 Maraya Cornell 2000-08-14 17:05:53 EDT
Actually, it's not working at all. Doesn't work on y2k either.  I don't have any 
idea why.  Can we please reopen this bug? This needs to work so that we can push 
the training section liv
Comment 10 Tom Lancaster 2000-08-21 13:41:06 EDT
It hadn't been pushed to y2k, hence wasn't working.
Now accepts non-standard ports, too.

Note You need to log in before you can comment on or make changes to this bug.