I have this .htaccess that I've been using to rewrite URLs like these:
www.example.com/index.php?page=brand www.example.com/brand www.example.com/index.php?page=contact www.example.com/contact www.example.com/index.php?page=giveaways www.example.com/giveaways
RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?page=$1 [L,QSA] I used a file called index.php to handle the redirects. Code used below:
$page = trim($_GET['page']); if($page == "giveaways") require('pages/giveaways.php'); Now, I would like to add another URL type like these:
www.example.com/index.php?page=products&p=ford-mustang TO
www.example.com/products/ford-mustang How will I accomplish this? Any suggestion would be greatly appreciated.