301 Redirect plugin will enable you to maintain search-generated traffic via previously indexed URLs; e.g., when you switch from another CMS to Shop-Script.
For some CMS's, the plugin offers pre-set redirect rules: WebAsyst Shop-Script (previous Shop-Script generation), OpenCart, InSales, Simpla, Magento, WooCommerce. To use them, enable the corresponding option next to a CMS name:
In addition to them, you can add custom redirect rules.
The plugin reforms redirects only from URLs of storefront pages which return the "404 Page not found" error. Such URLs are conisidered as "non-existent" and thus potentially requiring additional processing.
From one URL to another
For example, if you have changed the URL of a product, add a custom rule for the search-generated traffic to be redirected from the old URL to the new one. Should you change another product’s URL, add one more redirecting rule.
In this example, a website visitor will be redirected from the URL specified on the left to the URL specified on the right.
From several URLs to one URL
This option will be useful when you want to redirect website visitors from several similar URLs to some other URL; e.g., if you had several info pages on your old website and you want to have only one such page in Shop-Script, with all information combined in one text.
In this example, all URLs similar to that specified on the left, i.e. with any number of arbitrary characters instead of the asterisk (*), will redirect website visitors to one common URL specified on the right.
From multiple old URLs to multiple new URLs
It's a common task when you switch from one CMS to another to maintain search-generated traffic for new URLs which was indexed for old URLs. To complete it, use asterisk (*) as the mask symbol both in the left-hand and in the right-hand part of the redirect rule.
In this example, redirect will occur in a similar way as shown in the previous example. The essential difference between these two examples is that here each old URL is redirected to its own version on the new website, i.e. the asterisk specified in the new URL is replaced by the dynamic part found in lieu of the asterisk in the old URL. For example, URL page10.html will redirect to page/10/, page11.html will redirect to page/11/, etc.
This type of redirect is required only if old and new URLs have at least one common part. If it's not true (for example, if the old URL was page10.html and in Shop-Script you have changed it to info/), then the mask will not work, you need to add a simple "one-to-one" redirect rule described above in this article.
Regular expressions for advanced users
You can set up redirect rules using regular expressions. To make a rule specified on the left be processed as a regular expression rather than an ordinary mask, enable the checkbox next to that rule.
To use dynamic URL fragments from old URLs in the new URLs, insert such fragments between parentheses in the left-hand part and specify them in the right-hand part in the form of variables $1, $2, $3, etc., corresponding to the order of parenthesized subpatterns as described in the PHP documentation for preg_replace function.
With the rules shown in this example, URL category/some/product/test/ will redirect to some/test/.
By the way, you can set up the same redirect rule without using regular expressions, only with masks.