Show all

    Home page link problem Magento 2.1 and above using .htaccess rewrite

    Thought I would write a small article to help with anyone wondering why on earth a product as large or as mature as Magento latest version (2.2) Still won't allow you to add a 'Home' button onto the menu system.

    It requires mod_rewrite on your php installation which most do as standard, and adding only one line. Crazy I had to do this but hey!

    1. Setup the home link via shop categories as normal. In admin goto Catalog - > Categories -> and click 'Add new subcategory'. (see below image)
    2. Add the URL key as 'home'
    3. Your .htaccess should look like this - last line is the NEW piece of code required in bold. Just change to your website name
    <IfModule mod_rewrite.c>
    ############################################
    ## enable rewrites
    
    Options +FollowSymLinks
    RewriteEngine on
    
    ############################################
    ## you can put here your magento root folder
    ## path relative to web root
    
    #RewriteBase /magento/
    
    <b>RedirectMatch permanent ^/home.*$ http://www.NAME_OF_YOUR_website.com</b>
    
    

    Apparently earlier versions of Magento would allow you to use the seo url rewriter lurking in the admin to do this. Great except not for latest version - how silly!

    Leave a Reply