Whats the best way to do a redirect for mydomain.com to www.mydomain.com for a rails app on passenger?
best 301 redirect?
- Rwld
- Posts: 6
- Starts: 4
- Wiki Edits: 0
Hey there, i tried doing a mod_rewrite 301 redirect in my .htaccess, but it didn't work.
Whats the best way to do a redirect for mydomain.com to www.mydomain.com for a rails app on passenger?
Whats the best way to do a redirect for mydomain.com to www.mydomain.com for a rails app on passenger?
- Santhi
- Posts: 224
- Starts: 0
- Wiki Edits: 1
If your app is running on passenger,you need to contact support team for adding necessary rewrite rules in your domains vhost entries.
Add the following line to the .htaccess file if your app is running on FCGI
RewriteCond %{HTTP_HOST} ^yourdomain.com\.com
RewriteRule ^(.*)$ http://www.yourdomain.com.com$1 [R=permanent,NC,L]
Add the following line to the .htaccess file if your app is running on FCGI
RewriteCond %{HTTP_HOST} ^yourdomain.com\.com
RewriteRule ^(.*)$ http://www.yourdomain.com.com$1 [R=permanent,NC,L]
2008-09-05 05:10 PM
- Rwld
- Posts: 6
- Starts: 4
- Wiki Edits: 0
thanks for the quick reply