Redircting folder to new domain


I need on help on the following things:

Right now I have:
http// => files on root folder.
http// => /newdomain

If somebody access it will redirected to


I don’t quite understand the question. Are you asking how to direct a domain to a subfolder?

Subfolder needs to redirected to different domain.


Was there a question in that? Perhaps “How do I …?”

No worries. In your newdomain directory, include an .htaccess file with the following:

RewriteEngine on
RewriteCond %{HTTP_HOST} !newdomain\\.com$ [NC]
RewriteRule ^/?(.*)$$1 [R=301,L]
# Sorry for the /? in this code but, as a subdirectory of, there should (?) be a leading / in the {REQUEST_URI} received by the newdomain/.htaccess file.

Of course, that will redirect ANY/ALL file within the newdomain directory to the domain (without the subdirectory).

Since I’ve covered all that (and MUCH MORE) in my signature’s tutorial, I’ll leave the explanation to your reading. Don’t worry, if you don’t understand, please come back (or PM directly) with questions.