Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: htp "301 Moved Permanently"
marathoner_at_sina.com wrote:
> I found it:
>
> owa_util.status_line(301,FALSE);
> owa_util.redirect_url('http://www.abcd.com', TRUE);
>
> I'm aware some of the DBA folks out there couldn't care less. I post
> it here just in case somebody needs it in the future.
>
> Many thanks to those who replied.
>
> Lei
>
> On Jul 16, 1:28 pm, maratho..._at_sina.com wrote:
>> Hi, >> >> Is it possible to redirect a web page using htp? I want the web page >> to send a "301 Moved Permanently" message. >> >> Thanks in advance. >> >> Lei
Now that it is clearer what you intended ... your demo code will not run.
SQL> BEGIN
2 owa_util.status_line(301, FALSE);
3 owa_util.redirect_url('http://www.psoug.org', TRUE);
4 END;
5 /
owa_util.status_line(301, FALSE);
*
ERROR at line 2:
ORA-06550: line 2, column 3: PLS-00306: wrong number or types of arguments in call to 'STATUS_LINE' ORA-06550: line 2, column 3:
SQL> You are missing one of the parameters in status_line. Try this instead:
SQL> ed
Wrote file afiedt.buf
1 BEGIN
2 owa_util.status_line(301, '', FALSE);
3 owa_util.redirect_url('http://www.psoug.org', TRUE);
4* END;
SQL> /
PL/SQL procedure successfully completed.
SQL>
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Jul 16 2007 - 16:52:17 CDT