Page 1 of 1

getting index.html to invoke cms/*.php

Posted: Fri May 12, 2006 4:58 pm
by Donoss
Hi,

My Apache document root is mapped to a public_html directory on a linux box.  I'm using virtual hosting.  My CMSMS files are in a sub directory i.e. public_html/cms.  If I enter domain.com into my browser I get my default index.html page which says 'this is your default page'.  If I enter domain.com/cms I get to see my website as designed.  How do I get my default index.html to invoke my cms/*.php code?

Any pointers appreciated.

Many thanks

Andy

Re: getting index.html to invoke cms/*.php

Posted: Fri May 12, 2006 6:16 pm
by tsw
there are few options

1) move your cms installation to public_html (and rename index.html to index_old.html)
-this is probably your best choice (requires config.php editing for the folder settings)

2) use Rewriteengine to redirect everything to /cms (might interfere with cms modrewrite)
-you need to create .htaccess file with rewriterule

3) use html refresh for redirecting to cms/ folder
-there will be short redirecting time

I would go with option 1  :D

Re: getting index.html to invoke cms/*.php

Posted: Fri May 12, 2006 7:06 pm
by Nogga
4) Use HTTP-Redirection:
Save a file index.php in your public-directory with the following content:

Code: Select all

<?php
  header("Location: ./cms/index.php");
?>
So your visitor will automatically be redirected to your website.

Re: getting index.html to invoke cms/*.php

Posted: Mon May 15, 2006 1:06 pm
by Donoss
Nogga,

When for your solution and it works a treat, thanks very much to both of you.

Andy