View Full Version : index.php?page=
How would I make my my websites page URLs to be like that instead of being...
I would like it to look cleaner by using PHP. How would I do this? By the way, It would help if you explained the code because im not too good with PHP. Thanks.
03-14-2010, 05:47 PM
// put pages into an array, from eg: page.php?page=index.html
$pages = array("index.html","aboutus.html");
// check to see if page is valid
// include page requested
// page doesn't exist
echo 'page not found';
03-14-2010, 05:56 PM
I can't see that looks cleaner. Also search engines supposedly look at file names so a good file name can be useful.
03-14-2010, 07:01 PM
This is the way I do it. The following will get you something like index.php?x=shop
$x = explode(':', $_GET['x']);
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.