Showing posts with label subdomain. Show all posts
Showing posts with label subdomain. Show all posts

Tuesday, June 5, 2012

.htaccess subdomain argument not accessible in query string


I have written the following rules in .htaccess




RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.com
RewriteCond %1 !^www$ [NC]
RewriteCond %{REQUEST_URI} ^/news/news-details\.php$
RewriteRule (.*) news.php?div=%1

Thursday, May 17, 2012

Redirect "myapp.com" to "www.myapp.com" in rails without using htaccess?


Using Morph Labs' Appspace to deploy a site means no automated way to redirect 'myapp.com' to 'www.myapp.com' (and no access to .htacess).