Hi,
I have been trying to set up htaccess in a certain way for some time now. Is
the following possible?
Given:
Radiant installation: /rails/radiant/NAME
domain: website.com
Subdomain set up to point to NAME: NAME.website.com symlinked to
/rails/radiant/NAME (index.html removed from the subdomain's folder)
Type in NAME.website.com and you go to the Rails/Radiant app, and all the
internal links work properly.
type in website.com/NAME, and you get the app, but it has lost its styling
and Rails/Radiant cannot resolve the links.
type in www.website.com/NAME and you get the public_html directory listing.
What I'd like to be able to do is have www.website.com redirect to the
application at the subdomain NAME.
Here are my htaccess rewrite lines. Like I said, they handle the
subdomain-to-app mapping. I'd like to link www to the app or, in other
words, make the subdomain the 'default' and behave like it is sitting in the
public_html folder. My understanding is that this is possible and quite
common, but I can't find documentation that explains this common
functionality.
.htaccess==========
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^images/.*.(jpg|gif|png|bmp)$ /blank.$1 [NC,L]
#RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
setEnv RAILS_ENV production
RewriteCond %{HTTP_HOST} ^www.website.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.NAME.website.com$ [OR]
RewriteCond %{HTTP_HOST} ^name.website.com$
RewriteRule ^/?$ "http\:\/\/website\.com\/NAME\/" [R=301,L]
Feel free to point out my flawed logic or obvious mistakes. It seems to me
that this should be a simple thing to do.
Thanks,
=tom
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
List Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Radiant: http://radiantcms.org
Extensions: http://ext.radiantcms.org