8000 GitHub - Knectar/Magento-Store-Codes: Help with transitioning from a single-store site to a multi-store site employing store codes in URLs.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Knectar/Magento-Store-Codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento-Store-Codes

When Magento sites add a second store on the same domain there is a problem with legacy requests to old URLs. This is bad SEO and a bad experience for customers too, who will see an unhelpful 404 error page. Mage-Store-Codes (aka. Knectar_Storecodes) solves this by automatically forwarding unrecognised URLs to the default store.

Installation

Simply copy/merge this app directory with your own, then clear Magento's cache. Composer users can enter this command:

composer config repositories.firegento composer http://packages.firegento.com
composer require knectar/storecodes

Usage

As before, enable store codes in "System > Configuration > Web > Url Options > Add Store Code to Urls". Magento Store Codes will start working immediately, detecting 404 errors and turning them into 302 redirects. CMS pages are handled slightly differently and can be used to create a landing page. For example, create a new CMS page with the URL key "home" and enable it for "All Store Views". Any other CMS page with the same URL key but restricted to individual store views will become that store's home page.

For example these three addresses all have the URL key of "home" but show different content;

  • http://www.example.com/ - Landing page, with "All Store Views".
  • http://www.example.com/primary/ - Primary store home page.
  • http://www.example.com/secondary/ - Secondary store home page.

Magento Store Codes also adds a new option in the same location, "…and default store view". Change this to "No" to simply serve the default store at old URLs without any redirection. Non-default stores will continue to use their individual codes in URLs. A landing page is no longer possible in this mode.

The above example would now look like this;

  • http://www.example.com/ - Primary store home page.
  • http://www.example.com/secondary/ - Secondary store home page.

About

Help with transitioning from a single-store site to a multi-store site employing store codes in URLs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0