: Redirecting all subfolder URLs to another domain 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
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:
new-domain.com/
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?
More posts by @Lengel546
2 Comments
Sorted by latest first Latest Oldest Best
Just write in the /portfolio subdirectory .htaccess file, and will moved all your subdirectory to newdomain.
RewriteEngine On
RewriteRule ^(.*)$ new-domain.com/porfolio/ [R=301,L]
You can use RedirectMatch for this with 301 code. This will tell Search Engines resource has moved permanently.
RedirectMatch 301 ^/portfolio/(.*)$ new-domain.com/portfolio/
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.