user3290057
user3290057

Reputation: 11

.htaccess code for folder>subfolder>subfolder>allfiles.html (or jpg) redirect

I have tried various combinations and I'm going a bit crazy trying to figure out the .htaccess code to redirect all files in a folder>subfolder>subfolder>allfiles.html (or jpg)redirect

domain.com/portfolio/fashion-beauty/pages/.

to

http://myportfolio.smugmug.com

this is the latest I have tried with no luck...

Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.primary\.com  [NC]
RewriteRule ^portfolio/fashion-beauty/pages/(.*) $ http://myportfolio.smugmug.com/$1 [R=301,NC,L]

Thank you for any help

Upvotes: 1

Views: 132

Answers (1)

anubhava
anubhava

Reputation: 785521

You have a minor mistake in your URI matching regex, try this code in the root .htaccess of fotolook.com:

Options +FollowSymlinks -MultiViews
RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.fotolook\.com$  [NC]
RewriteRule ^portfolio/(.*)$ http://christine-copeland-makeup.smugmug.com/Las-Vegas-Weddings/? [R=301,NC,L]

Upvotes: 0

Related Questions