Forum Moderators: phranque
for example:
subdomain.mydomain.com/dir1/filename.extensio
to go to www.newdomain.com
but i also want any subsequent directories or files to also point at newdomain.com
ie. subdomain.mydomain.com/dir1/dir2/filename.extension
to go to: www.newdomain.com
is it possible to write a .htaccess file to do this. I have tried to google it and dont fully understand the more complex htaccess files.
Also
Does anyone know of any good tutorials which will help with this in the future?
You can use mod_rewrite:
RewriteRule %{HTTP_HOST} =subdomain.olddomain.com
RewriteRule ^dir1/ http://www.newdomain.com/ [R=301,L]
Jim