<?php
$page = strtolower($_GET["page"]);
if ($page == "home" || $page == "")
{
echo "home page content";
}
elseif ($page == "about")
{
echo "about page content";
}
elseif ($page == "games")
{
echo "Games page content";
}
else
{
echo "404 page not found";
}
?>
Uh, I am stupid with PHP, I just want the htaccess code to make it :/You don't need .htaccess for that.
You could just do something like..
PHP:<?php $page = strtolower($_GET["page"]); if ($page == "home" || $page == "") { echo "home page content"; } elseif ($page == "about") { echo "about page content"; } elseif ($page == "games") { echo "Games page content"; } else { echo "404 page not found"; } ?>
<?php
$page = strtolower($_GET["page"]);
if ($page == "home" || $page == "")
{
require('home.php');
}
elseif ($page == "about")
{
require('about.php');
}
elseif ($page == "games")
{
require('games.php');
}
else
{
echo "404 page not found";
}
?>
And would I put this in an empty index page or what? :/PHP:<?php $page = strtolower($_GET["page"]); if ($page == "home" || $page == "") { require('home.php'); } elseif ($page == "about") { require('about.php'); } elseif ($page == "games") { require('games.php'); } else { echo "404 page not found"; } ?>
Yes, just make a directory with games.php, index.php, etc. Then, where it says "require('about.php');", put the directory before the about.php part.And would I put this in an empty index page or what? :/