Я пытался много комбинаций переписать эти три экземпляра URL
https://www.myjohara.com/jewelry?jwelurl=Rings https://www.myjohara.com/collection?caturl=The-Global-Collection https://www.myjohara.com/productdetails?purl=Pearl-Ball-Choker-Yellow-Gold
до
https://www.myjohara.com/Rings.html https://www.myjohara.com/The-Global-Collection.html https://www.myjohara.com/Pearl-Ball-Choker-Yellow-Gold.html
или
https://www.myjohara.com/jewelry/Rings.html https://www.myjohara.com/collection/The-Global-Collection.html https://www.myjohara.com/productdetails/Pearl-Ball-Choker-Yellow-Gold.html
Я использовал этот код htaccess, который работает только при первом условии, т.е. https://www.myjohara.com/jewelry/Rings.html
Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC] RewriteRule ^([^/]*)\.html$ /jewelry?jwelurl=$1 [L] RewriteRule ^([^/]*)\.html$ /collection?caturl=$1 [L] RewriteRule ^([^/]*)\.html$ /productdetails?purl=$1 [L]
Буду признателен за любую помощь
Это решение, если кому-то нужна помощь по схожим вопросам
RewriteRule ^collections/([^/]*)\.html$ /collection?caturl=$1 [L] RewriteRule ^jewelrytype/([^/]*)\.html$ /jewelry?jwelurl=$1 [L] RewriteRule ^products/([^/]*)\.html$ /productdetails?purl=$1 [L]
Образец ссылки на коллекцию - https://www.myjohara.com/collections/The-Global-Collection.html
Образец ссылки на тип ювелирного изделия - https://www.myjohara.com/jewelrytype/Rings.html
Пример ссылки на продукт - https://www.myjohara.com/products/The-Drop-Diamond-Ring-Yellow-Gold.html