I would like to park multiple domains to one hosting. So I can use one total web design and multiple domains to tie them all together.
However, I would like one of domains to have its own DirectoryIndex to be page a.html. Basically, all other domains will go to index.html but when Domain X is used, I want it to go to home.html.
In htaccess, DirectoryIndex home.html will do the result. But this will do for all parked domains.
I was wondering if it can be done with php or any code to achieve this, like RewriteRule or RewriteCond?
Thanks.
PS, I realize that add-on domains will be the simpler way to solve this problem. But that would mean I would have to upload one website design (about 95 files with 200 images) to each of add-on "folder." And that too would be fine except pages are changed and modified almost daily. So uploading 295 files X 6 domains can get very irritating...
==========================
Update
==========================
Not long after I posted this topic, I did little more searching, cussing and pulling my, what's left of, remaining hair and I think I have found a simpler solution.
Manipulating .htaccess RewriteEngine to direct all incoming HTTP_HOST that matches my domain "X" to redirect to "page.html" so that
RewriteEngine On
RewriteCond %{HTTP_HOST} !^http://domain"x".com$ [NC]
RewriteCond %{HTTP_HOST} !^http://www.domain"x".com$ [NC]
RewriteRule ^index\.html$ /file_default_for_this_domain.php [L]
I am not the best in writing .htaccess rewrites, but please help me if I need to clean up my code. But basically, I have domain"x" or www.domain"x" coming in, for this domain only "file_default_for_this_domain.php" will be the default home page.
If you have index.php as your default page, edit to this rule
RewriteRule ^index\.php$ /file_default_for_this_domain.php [L]
==========================
Update
==========================
Scratch the whole posting from the last update. It does NOT work! Help me...















