1

I've researched this problem but still I have got no idea on how to fix it.

So, I worked on creating a proper menu structure for my products and by doing so, I have made categories with the intention of linking them up to the url taken from my layered navigation, let me try and explain:

I created a category called: Cases & Accessories --> Computer Cases --> Full Tower ('Full tower' being the type of products, filtered out)

I get the required URL by using my layered navigation, filtering the type of computer case which leaves me a URL of: XXX/cases-accessories/computer-cases.html?i_form_factor_771_1=6967 where i realised i cannot use special characters in the URL key inside catalog --> manage categories, then I start to create a custom url rewrite

The setup of the custom URL rewrite works perfectly, so I delete the system generated rewrite but when i reindex the catalog url writes, it generates a new system rewrite with a higher ID so uses that over the custom one with now a lower ID.

I tried another option which was to edit the system generated one, which only allows me to change the request path, I do this then reindex but again, the default request path is back on.

Here is a screenshot: Custom URL Rewrite

You see, the ID for the custom is currently higher but the front end is still showing the system url rewrite. For me to reflect the custom rewrite, i would have to delete the system one.

Futher screenshot reflecting the comments: enter image description here

This seemed to work, so i now need to change the 1st system rewrite from cases-accessories/computer-cases/full-tower-cases.html to fulltower.html, i try doing this inside the system rewrite, but after a reindex it changes back to cases-accessories/computer-cases/full-tower-cases.html. Any ideas? I created a 3rd url write with the target path of "catalog/category/view/id/1234" but it didnt work.

1

Not sure if this helps or not but I think i had a similar problem...

find the system created URL rewrite for the category tree you have created

change the redirect to Permanent 301

enter image description here

before you save copy the target path...

Then create a custom URL rewrite placing the copied target path into the custom url rewrite request path.

enter image description here

Update your new target path to where you want the category link to go. (My example goes to a CMS page with a URL key of "dry-eye") I believe this should stop the indexing affecting the link as you technically don't change any of the system rewrite info, instead you add a new rewrite that will apply after the system one.

I could be completely misunderstanding your question though :/

  • ok, now im really confused, are you saying you cant put "/cases-accessories/computer-cases?i_form_factor_771_1=6967" in the new target path as the GET data will change? – AndrewBramwell May 30 '16 at 13:26
  • re-indexing the urls should retain the order of which the rewrites were added, if it doesn't I believe there is something fundamentally wrong with your magento install – AndrewBramwell May 30 '16 at 13:28
  • try changing your custom rewrite request path from "full-tower-cases.html" to "catalog/category/view/id/1234" this should mean the system rewrite will run, then your custom one will pick up the request / target from the system rewrite and send to the custom target path – AndrewBramwell May 30 '16 at 14:19
  • you might need to change your system rewrite to "redirect permanent" for it to work (im not 100% though) worth a ttry – AndrewBramwell May 30 '16 at 14:20
  • I've added another screenshot, your suggestion seemed to work! Thanks. I now need to find a way to get the target path to show full-tower-cases.html instead of cases-accessories/computer-cases/full-tower-cases.html, i try changing this within the system rewrite, but after reindex it changes straight back. (i have deleted my unneccessary comments before your solution) – Mehdi Rafiai May 30 '16 at 14:57
0

I've experienced this same problem. Magento does not support "custom url rewrites" in admin panel for many reasons.

You have 3 options: Easiest to Hardest

  1. Utilize a Static block
  2. RewriteEngine On. Add your exception (.htaccess)
  3. Interpret & Modify (index.php)

Any other method will revert on Reindex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.