I've hosting with site.com, along with a domain (site2.com) that indicates a folder during my root directory known as /blog (this basically means site2.com indicates site.com/blog).

Then i make use of a .htaccess setup within the /blog directory to use to site2.com. It appears such as this

Options -MultiViews
RewriteEngine On

# redirects www.site2.com/* to site2.com/*
RewriteCond %{HTTP_HOST} ^www.site2.com
RewriteRule ^(.*)$ http://site2.com/$1 [R,L]

# redirects site2.com/* to site2.com/*.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z]+)/?$ $1.php [L]
RewriteRule ^([a-z]+)/([a-z0-9]+)/?$ $1.php?id=$2 [L]

However , the redirect to some .php file isn't working. Rather, I get a 404 error. It appears to become searching within the /blog folder and becoming confused since the domain names don't complement.

For example, I've got a file in /blog known as articles.php. Basically try navigate to site2.com/articles (the domain that's being submitted), I recieve the mistake

/blog/articles.php was not found

It appears like my RewriteRule is attempting to navigate to site.com/blog/articles.php rather than site2.com/articles.php (which due to domain sending is technically site.com/blog/articles.php).

Any help could be greatly appreciated. I can not appear to find this matter out