Host unlimited blogs, sites, forums for $4.95 only with this host

Web Hosting : .htaccess issues – Redirect

Hostgator and Bluehost are our best webhosts and godaddy.com is the best domain registrar.

This web hosting thread started by slingshot on 9 September 2008

I saw another post in here relative to .htaccess and redirecting domains, however, I am not getting the output that I think I desire.

I have a site http://www.oldsite.com and we purchased a new domain and rebuilt the site from scratch. The new domain is http://www.newdomain.com for instance.

We have the need to ensure all traffic forwards to http://www.newdomain.com even if someone visits a bookmark.

The following rewrite example gets me part of the way there and I have tried a couple of modified instances of the rewrite

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.newdomain.\org$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.org/$1 [L,R=301]

When I visit previously bookmarked sites I am taking to the new home page, however I get this as well: http://www.newdomain.com/modules.php…e=print&sid=47 which is still a reference to the old site.

Is there away to get it to drop the garbage at the end? I have tried removing the $1 as suggested in another thread, but to no avail.

Discuss this at WHT or read more about bluehost and hostgator

This entry was posted in Discuss Hosting Bookmark this post and come back later for the best web hosting coupons.

This web hosting blog is proudly hosted with reliable Hostgator webhosting for only one cents through this hostgator coupon. If you're new here, you may want to subscribe to this web hosting RSS feed

-->