I have a main domain with several subdomains. The main domain is a Joomla site, but the main domains are not, they are individual artist's sites, some with their own domain name, but others that use subdomains ( ie. artist.maindomain.com)
I recently set up JoomSEF (for my main domain Joomla site) and I just noticed that instead of getting my normal 404 error page on the subdomains, I am getting Internal Server Errors. I contacted my host support and they said, in essence, that because the subdomains don't use the Joomla index.php file, the "redirect runs in a loop causing you to go over the limit of internal redirects and never complete".
I went into the JoomSEF configuration to see if there was something I could do and noticed that I should include RewriteBase / in my .htacess file, so I did that. and now, in the subdomains, I am not getting the Internal Server Error, but I am also not getting a Not Found error, it simply goes to the Home Page for that subdomain. Some of these subdomains have custom 404 error files and others don't, but the same thing happens either way, on a 404 error it just goes to the home page.
I'm not very good at mod_rewrite, but I suspect there might be something that could be done in the .htaccess file. Can anyone help? CAn the .htaccess files be modified to solve this problem?
The subdomains have very simple .htaccess files usually similar to:
DirectoryIndex index.html index.php index.htm
IndexIgnore *
#Not all have the following
ErrorDocument 404 /errors/404.html
Here is part of my main domain .htacess file:
IndexIgnore *
Options +FollowSymLinks
#
Order deny,allow
#
<Limit PUT DELETE>
Deny from all
</Limit>
#JoomSef is not using this 404.php file
ErrorDocument 404 /errors/404.php
ErrorDocument 401 /errors/401.php
ErrorDocument 500 /errors/500.php
#
#
RewriteEngine on
RewriteBase /
#
# Rewrite old urls to go to new subdomains or domains
RewriteRule ^artist1(.*) http://www.artist1.com$1 [R=301,L]
RewriteRule ^artist2(.*) http://artist2.mydomain.com$1 [R=301,L]
RewriteRule ^artist3(.*) http://artist3.mydomain.com$1 [R=301,L]
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section