I can't figure out what's going on, and I'm not sure where to start in trying to fix it.
Here's the setup:
I have a Go Daddy hosting account that has several domains pointed to it.
MAINDOMAIN.com is the "primary domain", which is by default set to the root directory.
The other domains are by default pointed to folders like domain.com to directory 'domain.com/'.
What I want:
MAINDOMAIN.com should NOT access the root; instead, it should access a folder called 'MAINDOMAIN/'.
I don't want any website-specific files in the root, and I don't want the websites to be potentially loaded through another (a.com/b.com/....).
What I've done:
I set up .htaccess with mod_rewrite to solve this. Simple. And it worked for over a year.
Recently* this stopped working. I have no idea why. (*well, not too recently-- a few months ago, and I've been too busy/confused to fix it)
I'm using this .htaccess code:
Code:Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} MAINDOMAIN.com RewriteCond %{REQUEST_URI} !^/MAINDOMAIN RewriteRule ^(.*)$ MAINDOMAIN%{REQUEST_URI}
Sometimes when I load a page, it works. Sometimes it doesn't (404). Refreshing (especially shift+refresh-- force reload everything) usually helps. Sometimes when I continuously refresh it just loops back and forth between working and not working. What's going on!??
[EDIT: DEMO PAGES REMOVED]
I have no idea why some pages/files are more likely to have problems than others....
--
Part 2:
I also have another layer of .htaccess in one part of the website (a subdirectory).
This is just all messed up. Some pages are loaded through a single PHP page that generates the template.
It's inconsistent (and sometimes the poster loads, other times it doesn't).
I assume this will be fixed once the other problem is fixed, and this is just another level of not being sure where to start in fixing it. And it's not a huge priority right at the moment. But it's still odd.
Any ideas? Why would .htaccess be inconsistent? It's not wrong, it's just not always right.....?



Reply With Quote
Bookmarks