# Redirect?

**URL:** <https://www.ruby-forum.com/t/redirect/83682>\
**Category:** Radiant CMS\
**Created:** [January 28, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/redirect/83682 "2007-01-28T19:43:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton\_J\_Aylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Anton\_J\_Aylward](https://www.ruby-forum.com/u/Anton_J_Aylward)\
**Post date:** [January 28, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/redirect/83682/1 "2007-01-28T19:43:24Z")

</div>

Is there a way to set up a page so that it silently redirects to another  
one

Something that results in what one might conceive of as  
\<r:redirect dest="/about/faq" /\>  
with appropriate 404 handling?

–  
An NSA-employed acquaintance, when asked whether the government  
can crack DES traffic, quipped that real systems are so insecure  
that they never need to bother. Unfortunately, there are no easy  
recipes for making a system secure, no substitute for careful  
design and critical, ongoing scrutiny.  
– Matt Blaze in AC2

---

<div class="post-metadata">

**Author:** ![Anton\_J\_Aylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Anton\_J\_Aylward](https://www.ruby-forum.com/u/Anton_J_Aylward)\
**Post date:** [January 28, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/redirect/83682/2 "2007-01-28T19:49:25Z")

</div>

Anton J Aylward wrote:

> Is there a way to set up a page so that it silently redirects to another one
> 
> Something that results in what one might conceive of as  
> \<r:redirect dest=“/about/faq” /\>  
> with appropriate 404 handling?

Anton,

I started to do that for some pages on kckcc.edu, but found it was much  
easier to just write a rewrite rule instead. Here’s an example – this  
should work on Apache and Litespeed.

RewriteCond %{REQUEST\_URI} ^/some/old/page  
RewriteRule ^/some/old/page(.\*) /about/faq$1 [L,R]

If you want it to return a different redirect code (other than 301), you  
can append that to the R inside the square brackets. You might also  
find this helpful:  
[http://www.ilovejackdaniels.com/apache/mod\_rewrite-cheat-sheet/](http://www.ilovejackdaniels.com/apache/mod_rewrite-cheat-sheet/)

Hope that helps!

Sean

---

<div class="post-metadata">

**Author:** ![Anton\_J\_Aylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Anton\_J\_Aylward](https://www.ruby-forum.com/u/Anton_J_Aylward)\
**Post date:** [January 28, 2007, 8:51pm UTC](https://www.ruby-forum.com/t/redirect/83682/3 "2007-01-28T20:51:34Z")

</div>

Sean C. said the following on 01/28/2007 01:50 PM:

> I started to do that for some pages on kckcc.edu, but found it was much  
> easier to just write a rewrite rule instead. Here’s an example – this  
> should work on Apache and Litespeed.
> 
> RewriteCond %{REQUEST\_URI} ^/some/old/page  
> RewriteRule ^/some/old/page(.\*) /about/faq$1 [L,R]
> 
> […]

It helps me, in the role of the Webmaster.  
It doesn’t help the client since she only has access to the admin part  
of  
Radiant and doesn’t have shell access and would be freaked out by that  
cheat-sheet page. (I can’t say that’s its illuminating to me. I  
suppose  
you have to now all this stuff and view the cheat sheets as an aide  
memoir.)  
That’s what the ‘techie geeks’ like us are for, she says.

–  
Any simple problem can be made insoluble if enough meetings are held to  
discuss it.

---

<div class="post-metadata">

**Author:** ![Anton\_J\_Aylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Anton\_J\_Aylward](https://www.ruby-forum.com/u/Anton_J_Aylward)\
**Post date:** [January 28, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/redirect/83682/4 "2007-01-28T21:14:38Z")

</div>

On 28/01/07, Anton J Aylward [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> recipes for making a system secure, no substitute for careful  
> design and critical, ongoing scrutiny.  
> – Matt Blaze in AC2
> 
> * * *
> 
> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

I set up a layout called ‘Redirect’ that has the following template:

Then if I have a page I want to redirect elsewhere I just give it the  
‘Redirect’ layout and put the url I want to redirect to in the body.

---

<div class="post-metadata">

**Author:** ![Anton\_J\_Aylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Anton\_J\_Aylward](https://www.ruby-forum.com/u/Anton_J_Aylward)\
**Post date:** [March 29, 2007, 1:47pm UTC](https://www.ruby-forum.com/t/redirect/83682/5 "2007-03-29T13:47:41Z")

</div>

This is excellent stuff for unix newbies like myself. That  
mod\_rewrite cheat sheet is really helpful.

I addition, many web hosts provide a web based interface where you  
can create your redirects. I use [http://site5.com](http://site5.com) and I was searching  
for a solution to the redirect problem. I had misspelled the title of  
a page, and spread the link before I realised my mistake, and I  
wanted the old link to redirect to the correct page.

I found that I could create the redirect easily using the site  
administration tools provided. It’s not as flexible as writing your  
own mod\_rewrite rules, but for simple redirects it is really easy and  
simple to use.

I can’t write specific instructions for other hosts, but I found the  
URL Redirect interface under “Site tools” in the Site5 admin console.

Regards,  
Martin O.  
[http://smpl.se](http://smpl.se)

---

<div class="post-metadata">

**Author:** ![Anton\_J\_Aylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Anton\_J\_Aylward](https://www.ruby-forum.com/u/Anton_J_Aylward)\
**Post date:** [January 28, 2007, 9:48pm UTC](https://www.ruby-forum.com/t/redirect/83682/6 "2007-01-28T21:48:43Z")

</div>

Farrel L. said the following on 01/28/2007 03:13 PM:

> Then if I have a page I want to redirect elsewhere I just give it the  
> ‘Redirect’ layout and put the url I want to redirect to in the body.

## AYAH! Wonderful!

Two key perspectives from Jim Collin’s book “Good to Great”.  
1) “Being great is a decision” and  
2) “Being good is an enemy of being great”
