Hello folks,
My problem is rather easy to explain but unfortunately I couldn't find any solution for it:
I would like to redirect my domain "lastname.net" to the subdomain "firstname.lastname.net" using htaccess (simply because there are plenty of people with my last name and I want them to know that it's actually me :)) Anyway, I don't want to move all my files (located in the main root directory) to the subdomain or a separate folder in my root (like "lastname.net/mydir"). All I want is that the url the browser shows is "firstname.lastname.net/xyz" whenever people enter
http://www.lastname.net/xyz or also lastname.net/xyz. What do I need to change in order to do that? If I take out the additional folder "/mydir" and replace it only with "/" it doesn't work...Here's the code:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.lastname.net$ [OR]
RewriteCond %{HTTP_HOST} ^lastname.net$
RewriteRule ^mydir(.*)$ http://firstname.lastname.net$1 [R,L]
RewriteCond %{HTTP_HOST} ^firstname.lastname.net$
RewriteCond %{REQUEST_URI} !^/mydir
RewriteRule ^(.*)$ mydir/$1 [L]
Thanks a lot!