0

I'm trying to redirect sub.domain.com/folder1/ to sub.domain.com/folder1/folder2/ but I don't know-how. I've tried so for this but without success.

RewriteEngine On

 #If the host is "sub.domain.com"
 RewriteCond %{HTTP_HOST} ^sub.domain.com/folder1/$ [NC]
 #Then rewrite any request to /folder
 RewriteRule ^((?!folder).*)$ folder1/folder2/$1 [NC,L]

Is this even possible?

Your Answer

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

Browse other questions tagged or ask your own question.