The admin pages should work with the relative path plugin, but the
actual site itself might be an issue because it doesn't actually use
url_for, which is what the relative path plugin hooks into. Oh, and by
the way, you'd be using a ReverseProxy directive in apache, not an
Alias.
 
The problem that you'll have is that the Page#url method is used
everywhere for both the rendering of links to the user and also the
matching of urls. You want to match against /articles/monkeys-are-great,
but render /radiant/articles-are-great.
 
The simplest approach would probably be to set up two ProxyPass
statements in apache:
 
ProxyPass /radiant/admin/ http://localhost:3000/admin/
ProxyPassReverse /radiant/admin/ http://localhost:3000/admin/

ProxyPass /radiant/ http://localhost:3000/radiant/
ProxyPassReverse /radiant/ http://localhost:3000/radiant/

And then create a parent /radiant/ page in radiant and make everything a
child of that.


Otherwise, you might be able to make it work with:

class Page
  def url
    if parent?
      parent.child_url(self)
    else
      clean_url("/radiant/#{slug}")
    end    
  end
end

class SiteController
  def show_page
    response.headers.delete('Cache-Control')
    url = "/radiant/#{params[:url].to_s}"
    if live? and (@cache.response_cached?(url))
      @cache.update_response(url, response)
      @performed_render = true
    else
      show_uncached_page(url)
    end
  end 
end

________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris Dorner
        Sent: Thursday, 25 January 2007 8:39 AM
        To: radiant@lists.radiantcms.org
        Subject: Re: [Radiant] Radiant and Relative Path Plugin?
        
        
        I made an Alias on Apache (server.com/radiant/) which redirects
the request to the mongrel server, but Rails has just absolute links
(i.e. server.com/admin/pages ) but it should be rendered as
server.com/radiant/admin/pages.
        
        

_______________________________________________
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to