[Radiant] Relative Linking in Radiant

Oliver Baltzer oliver.baltzer at nobits.com
Tue Jun 12 10:00:52 CDT 2007


Chris Parrish wrote:
  > The only way I think that this premise could work is if you could tell
> Radiant to enforce a trailing slash on all pages (or no trailing slash 
> on all pages).  That way if the user typed (or a link sent them to) 
> 'www.website.com/root/a' Radiant would automatically redirect to 
> 'www.website.com/root/a/'
> 
> Then a writer could be sure that their pages would work as intended no 
> matter how the user got there.
> 
> I'm not sure everyone would want this convention or would agree to which 
> way it should work (always or never a slash).  Perhaps it could be 
> configurable.  Thoughts anyone?

I agree and support the idea of generally redirecting URLs without a 
trailing slash to URLs with trailing slash. I know it is easily done 
with every Web server in front of Radiant, but I think this should be 
part of Radiant. My only concern about generally enforcing this is that 
other document types (images, PDFs, etc.) end up with a trailing slash 
as well. Some context-based redirect would solve that, by asking the 
addressed page/object to redirect to its canonical URL.

Cheers,
Oliver



More information about the Radiant mailing list