You can create cases for like
And the code below will say whatever page is, to look for the case, and require what case pagename has.
I'm not making any sense.
- Code: Select all
// Set page to any kind of variable you want to replace page in index.php?page=pagename
// Be sure that if you change the page field in the first line to change it here in the $p area as well
$p = $HTTP_GET_VARS['page'];
// This says that if index.php has no value to get a home page included, but address bar still contains index.php
$p = 'index';
// Below is case index, where the $p='index'; looks for a home page. We can tell it for the homepage to look for home.php
// Here you can insert more and as many as you want require cases. Archives do not run here with &file=
// You can also make redirects manually instead of using an include redirect, see the code in my reply post for how to do so
// All require pages must end in .php
case 'anything you want':
// The error message if a required page will not come up or a bad variable is given see my 3rd reply for more info