Hi Vonja,

A silent redirect actually isn't a redirect. It's simply Apache serving some=
 other document for the script. So if you have two files:
1.r and 2.r
and when you get a request for 1.r, and you'd like to redirect silently to=
 2.r, you'll just have to serve 2.r (and not say anything about it to the=
 browser).

There is no way for the browser (at least not for the browsers I know) to=
 show another URI than the actual one in the address bar.

Here's a sample (not tested!):

replace incoming-url "1.r" "2.r"
print read next find incoming-url "/" # remove leading slash first

.. So you actually don't mess with the headers.

If you prefer to do the rewrite in a script made for that intent only,=
 Apache will let you do the rewrite processing with a rebol script:
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritemap
The apache directive would look something like this:
RewriteMap    to2-map       prg:/path/to/map.1to2.r

Hope this helps,
HY


Dixit [EMAIL PROTECTED] (07.46 23.09.2008):
>Hello Rebol List,
>
>I'm attempting to do a "silent" http redirect via REBOL
>rather than an Apache mod_rewrite.
>
>In Apache it could be written as:
>RewriteRule ^secret_crush_prank/?$ =
 /var/chroot/html/go/secret_crush_prank.html [NC,L]
>
>If the client visited http://www.domain.com/secret_crush_prank
>the client would be silently redirected to another page without
>seeing the new URI location in the Address bar of the browser.
>
>
>I found the following on a Rebol archive but it only
>does a standard redirect.  I've been trying to add
>different status codes to redirect silently but no=20
>success.
>---------------------------------------------------
>REBOL []
>
>http-redir: func [url] [
>    print join "Location: " url
>    print join "Expires: 0" newline
>    ]
>
>http-redir http://www.domain.com/go/secret_crush_prank
>
>----------------------------------------------------
>Any suggestions? Thank you for your help
>in advance.
>
>--=20
>To unsubscribe from the list, just send an email to=20
>lists at rebol.com with unsubscribe as the subject.

Pr=E6tera censeo Carthaginem esse delendam

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to