Bug 15962 - redirect.apm should accept relative urls
Summary: redirect.apm should accept relative urls
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Web Site
Classification: Red Hat
Component: Other   
(Show other bugs)
Version: current
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Lancaster
QA Contact: Paul Lindner
URL: http://sassy.soma.redhat.com:8500/tra...
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-08-10 23:05 UTC by Maraya Cornell
Modified: 2007-04-18 16:28 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Maraya Cornell 2000-08-10 23:05:29 UTC
redirect.apm requires full urls:
/http://www.redhat.com/training/elearning/catalog/topic/java.html

Won't accept:
/training/elearning/catalog/topic/java.html

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 23:09:08 UTC
correction:

redirect.apm requires:

/http/www.redhat.com/training/elearning/catalog/topic/java.html


Comment 2 Paul Lindner 2000-08-10 23:10:45 UTC
Tom,

can you have a look at this script.

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

Thanks.


Comment 3 Tom Lancaster 2000-08-11 20:17:32 UTC
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 22:01:59 UTC
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?

http://y2k.portal.redhat.com/training/elearning/catalog/index.html


Comment 5 Tom Lancaster 2000-08-11 22:34:00 UTC
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 22:39:55 UTC
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">
and
<OPTION VALUE="/training/elearning/catalog/topic/c.html">

but both just take me to the home page.


Comment 7 Tom Lancaster 2000-08-11 23:09:22 UTC
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 20:54:52 UTC
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. 



Example:

http://sassy.soma.redhat.com:8500/training/elearning/catalog/

(drop-down men

Comment 9 Maraya Cornell 2000-08-14 21:05:53 UTC
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 17:41:06 UTC
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.