Forum Moderators: Robert Charlton & goodroi
http://www.example.com/details/B7427/parts/5/images/Claimer%202011%20Front.pdf http://www.example.com/images/Claimer%202011%20Front.pdf http://www.example.com/details/B7427/parts/5/Ford.html
RewriteEngine On
RewriteRule ^([^/]*)\.html$ /index.php?content=$1 [L]
RewriteRule ^([^/]*)/([^/]*)\.html$ /index.php?content=$1&manufacturer=$2 [L]
RewriteRule ^([^/]*)/([^/]*)/machine%20shop/\.html$ /index.php?content=$1&service=$2 [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /index.php?content=$1&product=$2&service=$3 [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)\.html$ /index.php?content=$1&MID=$2&category=$3&manufacturer=$4 [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)\.html$ /index.php?content=$1&part=$2&category=$3&MID=$4&manufacturer=$5 [L] [edited by: Robert_Charlton at 7:51 pm (utc) on Oct 12, 2012]
[edit reason] examplified domain [/edit]
* in ^([^/]*)/([^/]*)/([^/]*)/([^/]*)\.html$ allows a request for example.com////.html to be considered valid and be rewritten (with blank parameter values passed to the PHP script). The * should be replaced with a + in each case. [^/] in each rule should be [^/.] as you're looking to stop at the period before the extension, no longer looking only for folder slashes.