php – problem with url friendly

Hello, I have problems with my friendly URL. Here is the .htaccess file

.htaccess file

Rewrite Engine On
RewriteCond% {SCRIPT_FILENAME}! -F
RewriteCond% {SCRIPT_FILENAME}! -D
RewriteRule ^ (. *) $ Index.php? Url = $ 1

File index.php

$ url = (isset ($ _GET.)['url'])) $ _GET['url'] : & # 39; & # 39 ;;
$ explode = explode (& # 39; / & # 39 ;, $ url);

$ pages = array (home, cart, category, subcategories, product)
"Buy-stopped", "Not logged in", "Shopping cart empty", "Register",
"Payment", "Login", "Lojacompleta", "List Courses");

var_dump ($ explode);

if (isset ($ explode)[0]and explode[0] (That
{
include_once "home.php";
}
otherwise if ($ explode[0] (That
{

if (isset ($ explode)[0]) && in_array ($ explodes[0], $ pages)) {

include_once $ explodes[0] , ".Php";

} else {

include_once "home.php";
}

} 

This part of index.php displays the body, which is variable.

So in my browser, I set localhost / official store / register to show only the body of the page, but not the header.php, menu-lateral.php, rodape, and sidebar. So if I store localhost / official /? Url = register it works there, I want to so-> localhost / officially save / register, but it does not recognize the URL …