I want to rewrite this url
site.come/info.php?country=america&state=colorado&city=denver
To
site.com/info/america/colorado/denver
.htaccess
RewriteEngine On
RewriteBase /
RewriteRule ^info/(.*)/(.*)/(.*)/$ info.php?country=$1&state=$2&city=$3 [L]
RewriteRule ^info/(.*)/(.*)/$ info.php?country=$1&state=$2 [L]
RewriteRule ^info/(.*)/$ info.php?country=$1 [L]
info.php
<?php
// City info
if (isset($_GET["country"], $_GET["state"], $_GET["city"])){
include('tabel.city.php');
// State info
} elseif (isset($_GET["country"], $state["provincie"])){
include('tabel.state.php');
//Country info
} elseif (isset($_GET["country"])){
include('table.country.php');
// Landing Page
} else {
include('tabel.general.php');
}
?>
I think there is something wrong, but I tried so much options for the last 6 days T.T
I hope you guys can help me out, thanks in advance!