ServerAdmin [email protected]
CustomLog domlogs/mydomain.com combined
ScriptAlias /cgi-bin/ /home/mydom/public_html/cgi-bin/
This is my two entries into httpd.conf. I have it setup, so if it's www.mydomain.com or mydomain.com ,it goes to the main site automatically, and then i have it setup so if it's ANY subdomain at all, it will resolve to /subdomain/ on the server.
MOST are 404's right now unless the folder exists, then it works perfectly.
I tried putting in a ErrorDocument 404 /index.php (since that is what I need it to do, but it didn't work.) I had to use ErrorDocument 404 http://www.mydomain.com/index.php which is NOT what I want, it does not work with my ******** like service, I need it to show the main page but the URL in the title bar CANNOT change.
IS it possible to have a IF statement, so I can write a IF statment in the httpd.conf, and IF it's a 404, then it SETS the VirtualDocumentRoot = /home/mydomain/public_html/ and IF it's NOT 404, it sets VirtualDocumentRoot = /home/mydomain/public_html/%1