I have a domain that is example.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?


Just write in the /portfolio subdirectory .htaccess file, and will moved all your subdirectory to newdomain.

RewriteEngine On
RewriteRule ^(.*)$ http://new-domain.com/porfolio/$1 [R=301,L]

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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