Trying to do some 301 rewrites but an urls string is appended..
I think this is happening because I’m using a SEO rewrite and 301 redirect on top? Any suggestions on how to fix this would be highly appreciated!
The problem is:
This URL: domain.nl/meubels/Tafels/Theetafels-en-wijntafels/
Should be rewritten to: domain.nl/meubels/tafels/theetafel-wijntafel/
But it’s rewritten to: domain.nl/meubels/tafels/theetafel-wijntafel/?activetab=Tafels&cat=Theetafels-en-wijntafels
Where this should not be added to the URL: ?activetab=Tafels&cat=Theetafels-en-wijntafels
My htaccess file:
ErrorDocument 404 /error404.php
RewriteRule ^meubels/$ product-listing.php?show=home
RewriteRule meubels/(.*)/(.*)/(.*)/$ product-listing.php?activetab=$1&cat=$2&open=$3
RewriteRule meubels/(.*)/(.*)/$ product-listing.php?activetab=$1&cat=$2
RewriteRule product/(.*)/$ product-detail.php?id=$1
RewriteRule info/(.*)/$ text-page.php?show=$1
RewriteRule info/(.*)/$ text-page.php?show=$1
# DirectoryIndex product-listing.php?cPath=32
Redirect 301 /meubels/Tafels/Theetafels-en-wijntafels/ /meubels/tafels/theetafel-wijntafel/
And like @Liam Bailey said, it should be on top, before other rewrite rules.