1. Home
  2. Docs
  3. Topics
  4. FooSales Web App
  5. Configure Rewrite Rules for WP Engine

Configure Rewrite Rules for WP Engine

The FooSales for WooCommerce plugin sets up WordPress rewrite rules upon activation to ensure that files are loaded from the correct location. These rewrite rules sometimes don’t work on specific servers. If you are experiencing issues such as seeing a blank screen after connecting to your store, your server might not be using these rewrite rules.

WP Engine is an example of a web host where you will have to manually add a rewrite rule to ensure that FooSales works correctly on their servers.

To add the appropriate rewrite rule, open your site’s WP Engine dashboard (my.wpengine.com) and click on rewrite rules in the menu.

Screen Shot 2020 01 28 At 14.54.21

 

Click the New redirect rule button to add a rewrite rule. You can give the rewrite rule a recognizable name such as “FooSales”. You can either setup the rewrite rule for all domains or a specific one. In the source input field, type the following:

foosales/static/(.*)

In the destination input field, type in the following and make sure you are using your site’s domain or subdomain with https:

https://[your domain]/wp-content/plugins/foosales-for-woocommerce/public/build/static/$1

or

https://[your subdomain].wpengine.com/wp-content/plugins/foosales-for-woocommerce/public/build/static/$1

In the advanced settings, make sure 301 Permanent is selected as the rewrite type.

Wpengine Rewrite Rule

Once you have saved the new rewrite rule, it should start working within a few minutes. You can then try accessing the FooSales Point of Sale menu from your WordPress Admin Area again, which should now load properly.

Tags , , , ,