Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to 301 redirect in Apex?

Jens MarreJul 29 2010 — edited Aug 16 2010
Hi,

has anybody experience in how to send a 301 redirect in Apex?

Google has indexed some URLs to our product page for products which are not in stock any more. Therefore I created a page process which redirects to a proper valid URL if the requested product is not in stock anymore.
Problem is, any redirect I manage to do in Apex is a 302 redirect. But the proper action in such a case would be, to send a 301 (permanently moved) redirect.

While researching I stumbled accross a trick in Tyler Muth´s blog
http://tylermuth.wordpress.com/2008/05/11/speech-to-text-to-apex

which adds an additional status line in the response:

owa_util.status_line(301, null,FALSE);
owa_util.redirect_url('/new-url', TRUE);

In my environment (XE, Apex 3.2.1) this approach still sends a 302 redirect.

I´d be glad for some insight from anyone

Thanks
Jens
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2010
Added on Jul 29 2010
2 comments
1,224 views