I would like to rewrite the following (example product below) /category/group/name-product-12345.html (note: name and 12345 can change) to a different directory /products/product.php?num=12345 RewriteRule ([^-]*)-product-([0-9]*).html /products/product.php?num=$1 [L] Is it the pathing incorrect or can you not change to another directory?
yah - you can have it reading from any directory. Check out my site in my sig - I only have 5 files in the whole site but it looks like thousands of folders to everyone else.
in your .htaccess: RewriteEngine On RewriteRule ^category/group/(.*)-product-(.*).html$ /products/product.php?name=$1num=$2 this should replace your Name to querystring name= and num to the num= all hitting the same page
Thanks - have got it working but it falls over with french accented characters How do you add French characters to the rewrite statement?
No idea - sorry bro. To remove the "Accented" characters you can convert to Uppercase, then back down to lowercase, this will convert an "Ä" to "A" then to "a" if these are the chars you mean?