[Radiant] Subdomains and old urls

Sean Cribbs seancribbs at gmail.com
Thu Apr 17 08:45:59 CDT 2008


I did something similar for Redken... essentially create a new Page type 
called RedirectPage that does the redirection for you:

class RedirectPage < Page
  def process(request, response)
    response.redirect(part(:body).content, "301 Moved Permanently")
  end
end

Then fill in the URL in the "body" part of the page and set the page 
type to "Redirect".  Of course, this will need to be in an extension. 
(Also, I'm not 100% positive on the syntax above, be sure to check.)

Sean

Chris Barnes wrote:
> I ended up leaving the blog on typo and its running at
> blog.randomutterings.com.  The rest of the site is now on radiant at
> www.randomutterings.com.  Can anyone tell me the simplest way to do a 301
> redirect in Radiant?  I have 3 or 4 articles that moved to the blog
> subdomain and I would like to create pages in Radiant with their old urls
> and redirect them to the new ones.
>
> On Wed, Apr 9, 2008 at 11:17 AM, Mohit Sindhwani <tech at onghu.com> wrote:
>
>   
>> Chris Barnes wrote:
>>
>>     
>>> My site runs under www.randomutterings.com <
>>> http://www.randomutterings.com>.  The live site is still on typo so
>>> ignore that.  Once I finish changing over to radiant, the blog will be at
>>> www.randomutterings.com/blog/ <http://www.randomutterings.com/blog/>.  I
>>> would like to make the blog run at blog.randomutterings.com <
>>> http://blog.randomutterings.com> instead.
>>>
>>>       
>> OK, I fear I may not be able to help with that.  If your blog (only) was
>> on Radiant, it would be quite simple.  That's the bit I've done :(
>>
>> Sorry but I think someone else will need to jump in here :-|
>>
>> Cheers,
>> Mohit.
>> 4/9/2008 | 11:17 PM.
>>
>>
>>     
>
>
>   



More information about the Radiant mailing list