I know there is a code for this but I can't remember which site it was on. An example would be: For the "index.php" of my site I want to display "news.txt" in my content area, and my links will be "index.php?id=whatever". So if I went to "www.mysite.com" the toolbar would not read or be redirected to "index.php?id=news.txt" but the news would already be there, yet for every other link the URL will change to "index.php?id=page" do you know what I mean? sorry If I didn't explain it properly but hopefully someone understood and knows the code for it
<?php // If 'url' is sent via GET method, include it, else display default index site if (isset($HTTP_GET_VARS['url'])) { $include = str_replace('../', '', str_replace('http://', '', $HTTP_GET_VARS['url'])); while ($include[0] == '/') { $include = substr($include, 1); } if ($include == "index") echo "Not allowed"; // .php is added here for safety reasons (link should be without .php) if (file_exists($include.'.php')) { include_once $include.'.php'; } else { echo "Can't find the page u r looking for."; } } else { // Display default index site include_once "news/news.php"; } ?> PHP: with this you will have links like : index.php?url=page also you can add files to folders so the link will be :index.php?url=folder/page Change $HTTP_GET_VARS['url'] to GET['url'] if it's not working on your server. or just change ['url'] for different ulrs. script includes default file if file user is requesting is not there I hope this helps.
//Get page $page = strtolower($_GET['id']); //List of allowed pages $page_array = array('index','faq','login','forgotpass','register','account','main','etc'); if(in_array($page,$page_array)){ include($page.'.php'); } else { include('index.php'); } PHP: Peace,