URL Rewrites - ecellar/remote-widgets GitHub Wiki
URL Rewrites depends on both a server-side configuration and a configuration change for Designer Widgets. Each type of server configures URL Rewrites differently. Below we provide the solution we use in Word Press, for other types of hosting you will need to work with your hosting provider to properly configure URL Rewrites for your site.
We have successfully used the Redirection plugin for Word Press and recommend it for consideration. We use a regular expression (regex) to match urls with “/shop/” and pass that along to a word press page named shop without changing the URL. The image below shows these settings.
Our epubOptions then get initLocationPath: true like so:
epubOptions = {
APIKey: '<provided by eCellar>',
pathRoot: '/shop/',
initLocationPath: true
}
Now our current releases URL changes from
https://<www.yoursite.com>/shop/?view=products&slug=current-releases
to
https://<www.yoursite.com>/shop/products/current-releases
1. Let eCELLAR Support know the rewrite URLs for your Site Settings.
2. Realize that, if you switch an existing site to rewrites, links that used to include query strings will no longer work.