I’m confused about apache RewriteRule in htaccess. I have hundreds of header('Location: script_name.php');
in my webapp and would like to make url’s more user friendly (not SEO friendly as search engines won’t be allowed to crawl the app). Here's a typical piece of code :
if(isset($_POST['get_product']))
{
// PHP/PDO code here
header('Location: product_catalog_detail.php?with or without query strings');
}
that gives :
http://localhost/smart_entreprise/folder1/folder2/product_catalog_detail?catID=1&productID=1
Now I'd like to keep this URL server-side and show the user this for all script names beginning with product_catalog
:
http://localhost/smart_entreprise/folder1/folder2/catalog
or even better :
http://localhost/smart_entreprise/catalog
Doest it makes sense ? Thanks.