rewriting baseurl

Hi -
I am trying to rewrite the canonical url for a basic omeka install, but am not having any luck.

If I try adding something like
"#RewriteRule ^/?$ http://new.canonical.hostname/$1 [R]"
the the base .htaccess, I get an error in Firefox about it detecting the redirect is occurring in a way that'll never complete.

I tried bypassing the .htaccess and adding a Redirect to the vhost - but got the same error.

What am I missing. I simply want users to use the new name for the site.


Are you sure you're writing the rule/redirect in a way that it won't happen for people who are already on your "new" domain? The one you posted looks like it should have a RewriteCond excluding people that are already on the right domain.

Thank you. I wound up doing the following:

RewriteCond %{HTTP_HOST} !^my\.canonical\.host\.name [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule (.*)$1 [L,R]

Which appears to be working. If I used the example from the apache docs:

It never worked. I had to modify
this line:
RewriteRule ^/(.*)
RewriteRule (.*)
at which point it started working.