redirect index.php to another page
Posted: Mon Feb 12, 2007 5:57 pm
hey all.
i have an index.php page that contains the following code :
this part works fine. the problem is, when i visit my website ( eg: http://mywebsite.com/ ) i receive a blank index.php page. This means i have to refer everybody to http://mywebsite.com/?show=login. ( i can't perform any output inside index.php or it will show in every page ).
If i set a redirection inside index.php, this also affects all my pages. Is there a way i can make this work so it redirects to the login page when a user visits http://mywebsite.com/ and not touch all the other pages ?
thanks
--tarja
i have an index.php page that contains the following code :
Code: Select all
switch( $show )
{
case "login"; require( "login.php" ); break;
case "logout"; require( "logout.php" ); break;
case "home"; require( "home.php" ); break;
}If i set a redirection inside index.php, this also affects all my pages. Is there a way i can make this work so it redirects to the login page when a user visits http://mywebsite.com/ and not touch all the other pages ?
thanks
--tarja