[Radiant] .htaccess mod_rewrite woes

Oli Studholme radiantcms.org at boblet.net
Wed Jul 16 00:05:55 CDT 2008


Hi All,

I just can’t seem to get redirects going in  
Radiant’s .htaccess. Can someone enlighten me?

In the default .htaccess file after RewriteEngine On (shich should be  
after the Options at the top btw) I tried these vavriants

     RewriteRule from.html to.html

     RewriteRule from.html http://domain/to.html [R=301,L]

     RewriteCond %{REQUEST_URI} ^/from\.html
     RewriteRule .* http://domain.com/to.html [R=301,L]

which all work on another domain on this server. Nothing happens. I  
also tried adding the example ‘tell Rails to ignore this’  
rules, but I’m probably doing it wrong.

     RewriteRule from.html to.html
     RewriteCond %{REQUEST_URI} ^/to\.html
     RewriteRule .* - [L]

Any ideas? I actually want to redirect one file and map it to a  
subdomain (eg http://domain.com/test to http://test.domain.com/), but  
I can’t even get simple file redirection going. Finally  
I’d like to know if it’s possible to use .htaccess to  
generate canonical URLs. Specifically I want http://domain.com/ to  
redirect to http://www.domain.com/, and all trailing slashes to be  
stripped eg http://www.domain.com/news/ to http://www.domain.com/news

Thanks for your time

peace - oli

PS This is using Radiant 0.6.6, the last version that supports the  
gettext interface localization plugin I’m using. Btw what needs  
to be done to resurrect jargon’s gibberish i18n support?  
I can’t even get jargon to install atm


More information about the Radiant mailing list