Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a domain that is domain.com/portfolio/some-url

I would simply like to direct all traffic that would normally go to the subfolder /portfolio to a new domain:


How would I do this? Htaccess? Is there a way to do it to separate affiliation?

Basically, all the /portfolio items are affiliate links that I don't need anymore and don't want the possibility of it decreasing my site rank in Google. What type of redirect should I use?

share|improve this question

you can use RedirectMatch for this with 301 code. This will tell Search Engines resource has moved permanently.

RedirectMatch 301 ^/portfolio/(.*)$ http://new-domain.com/portfolio/$1

share|improve this answer

just write in subdirectory .htaccess , and will moved all your subdirectory to newdomain

RewriteEngine On
RewriteRule ^(.*)$ http://new-domain.com/porfolio/$1 [R=301]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.