Hi Guy's, Im hoping someone can help me here.... OK here is my .htaccess file Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^([0-9]+)-(.+)\.php$ Boatcameras/news-details.php?news_id=$1&news_seolink=$2 [L] RewriteRule ^([0-9]+)\.php$ Boatcameras/product-range.php?ProdCat=$1 [L] RewriteRule ^([0-9]+)-(.+)\.php$ Boatcameras/product-details.php?ProdID=$1&ProdSeo=$2 [L] The first two rewrite rules are working perfectly, but for some reason the third rewriterule is returning the same pages as the first rewriterule. When obviously looking at this htaccess file, it should be going too product-details.php. Please could someone advise me on whats going wrong here? Im new to htaccess and Mod-Rewrite, and after spending 6hrs working on this last night im pretty exhausted!! Thanks in advance Tom For exa
There are 3 RewriteRules on your .htaccess files, but the 3rd one is completely useless as it has the same pattern as the first one, only the substitution changes, so that 3rd rewriterule is never reached RewriteRule [COLOR="Red"][B]^([0-9]+)-(.+)\.php$[/B][/COLOR] Boatcameras/news-details.php?news_id=$1&news_seolink=$2 [L] RewriteRule ^([0-9]+)\.php$ Boatcameras/product-range.php?ProdCat=$1 [L] RewriteRule [COLOR="Red"][B]^([0-9]+)-(.+)\.php$[/B][/COLOR] Boatcameras/product-details.php?ProdID=$1&ProdSeo=$2 [L] Code (markup): Note: Please wrap your code inside, PHP, HTML or CODE tags fore more clarity
Thanks for getting back to me so soon, and i apologise for not wrapping the tags :-( So how would i need to resolve this to make the 3rd Rewrite work? Regards Tom
Since I don't know your website my suggestions may be wrong, but the first one that comes to my mind is to use a different pattern for the 3rd RewriteRule: I suggest using ^([0-9]+)-(.+)-details\.php$ Code (markup): You may have to change existing links