I am trying to build a store site. I want it to have friendly urls such as "/home","/store","/store/5443405", etc. I just cant figure out how to give my url more than one level. i.e. "/home" << one level "/store/5443405" << 2 levels. My php file looks like this right now
<?php
include 'includes/functions.php';
$p = isset($_GET['p']) ? $_GET['p'] : 'home';
$page = $p.'.php';
if (file_exists($page)) {
include $page;
}
else {
print $page;
}
?>
and my .htaccess:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ ./index.php?p=$1