You are here: Re[2]: [PHP] Best way to do this: www.domain.com?page=var « PHP « IT news, forums, messages
Re[2]: [PHP] Best way to do this: www.domain.com?page=var

Posted by Steve Clay on 10/04/63 11:37

Monday, January 16, 2006, 5:14:49 PM, tg-php wrote:
> Should just be a matter of adding "start.php" to your defaults list in
> whatever priority order you want.

Apache's .htaccess:
DirectoryIndex start.php index.php index.html

In start.php:
// instead of redirecting, just set page
if (!isset($_GET['page'])) {
$_GET['page'] = 'home';
}

If, for some reason you /can't/ change the directory index page, make an
index.php with this:
// again, no redirect necessary
$_GET['page'] = 'home';
require('start.php');

Steve
--
http://mrclay.org/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация