Re: Redirecting to a new URL under mod_ruby

Shugo Maeda <[email protected]>
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Hi,

At Tue, 22 Jun 2004 18:19:04 -0700,
Nick Bicknell <[email protected]> wrote:
> Okay, I figured it out one way to do it, stolen from here: 
> 
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/50294
>  
> The following seems to work fine instead of the print statement: 
>  
> q.header("Location" => caller_url)

Or you can call the API of mod_ruby directly:

  r = Apache.request
  r.headers_out["Location"] = "http://www.modruby.net/"
  exit Apache::REDIRECT

Shugo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.