I am in the process of redirecting outdated URLs to their new URL.
I dynamically generate the product page URLs using the following three RewriteRules:
# PRODUCT SUB-CATEGORY REDIRECT -- Must follow syntax: domain.com/products/CATEGORY/SUB-CATEGORY
RewriteRule ^products/([^/]*)/([^/]*)$ /product-subcategory.php?category=$1&sub-category=$2 [QSA,NC,L]
# PRODUCT CATEGORY REDIRECT -- Must follow syntax: domain.com/products/CATEGORY
RewriteRule ^products/([^/]*)$ /product-category.php?category=$1 [QSA,NC,L]
# PRODUCT CATEGORY REDIRECT WITH PAGE NUMBER
RewriteRule ^products/([^/]*)/page/([^/]*)$ /product-category.php?category=$1&page=$2 [QSA,NC,L]
The above methods work correctly.
Now, I am trying to redirect the old URL structure shown here:
http://example.com/company/categories.cfm?c=Standard_Cabinet
To the new page, shown here:
http://example.com/products/standard-cabinets
I tried this RewriteRule, with no success:
RewriteRule ^company/categories.cfm?c=Standard_Cabinet$ http://www.example.com/products/standard-cabinets [R=301,NC]
I just keep getting redirected to my 404 page. I do not need to keep the old URL parameters