Properly Removing the .html Extension from URL’s & Handling the 301 Redirects in Magento

Geoff Jackson

Geoff Jackson (more commonly known by his online pseudonym zigojacko) is the founder of Design Haven and The Clubnet Group which hosts numerous agencies including the most widely recognised of them, Clubnet Digital, a full service digital marketing and creative design/development agency. He also has a personal blog but it doesn't get updated as much as he'd like.

You may also like...

Sponsored Links...

Subscribe to Design Haven UK

Enter your email address to subscribe and receive our new posts by email.

4 Responses

  1. Vicki says:

    Hi there

    Picking your brains after going around in circles in the hope you may be able to give another pointer 😉

    We have remove .html from product suffix, reindexed and recached.

    As this didn’t work we assumed it must be something to do with an incorrectly configured htaccess file so reinstalled default magento htaccess and then added the piece of code above.

    Still nothing…

    Disabled plugins which we know affect URL structure (manadev and creare); still nothing….

    Any ideas you may have as to the cause would be greatly heard 🙂

  2. Hey Vicki, thanks for leaving a comment.

    So just to clarify then, after all of the above, all your URL’s still contain .html at the end of them?

    One thing that might be worth trying is toggling your store scope in the system configuration to ensure that .html isn’t added as a suffix for your actual store website/store view in addition to default config.

    Magento Store Scope URL Suffix

  3. rob says:

    Hey, nice post.

    I am using Magento 1.9 and have removed the url suffix for both products and categories. Magento is handling the redirects just fine, but i havent added the htaccess bit you mention

    Is it really necessary, if i dont get 404s?

    Was there an update of magento between your post and now that changed the way this works?

     

    Any insights would be appreciated.

    • Yes, you’re right Rob, since this post was originally written, something has been released with the Mage core that auto-redirects the category and product URLs is the suffix is removed/added therefore not requiring the change to .htaccess.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: