I'm trying to do a 301 from one site to a specific folder on a different site, without automatically tacking on the rest of the URL. The problem is the redirect keeps appending the rest of the URL to the new site. This happens whether I do the redirect through htaccess or a php Location redirect. Any help would be appreciated. What I want: www.site.com/* -> www.site2.com/specific_folder/ What happens: www.site.com/* -> www.site2.com/specific_folder/*
What rewriterule do have you currently? The query string will always be passed on if you don't manually alter it in the destination of the rule, so if you're using dynamic URLs this could be the problem. To stop the query string being passed you need to overwrite it by including ? in the destination. RewriteRule .* http://www.site2.com/specific_folder/? [R=301] Code (markup):