Welcome Guest | Login

best 301 redirect?

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?

2008-09-05 04:41 PM

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]

2008-09-05 05:10 PM

thanks for the quick reply

2008-09-05 05:24 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!