Quantcast
Channel: BulletProof Security Forum » All Posts
Viewing all articles
Browse latest Browse all 12473

Reply To: 403 Forbidden error: Woocommerce

$
0
0

An alternative method of whitelisting the entire /shop URI|URL is this method below:

1.  Go to the BPS htaccess File Editor page, click on the Your Current Root htaccess File tab, scroll down in your Root .htaccess file code until you see this .htaccess code below (or similar code – may look slightly different than the code below).

# WP REWRITE LOOP START
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

2.  Copy your # WP REWRITE LOOP START code to this BPS Root Custom Code text box:  CUSTOM CODE WP REWRITE LOOP START
3.  After you have copied your WP Rewrite Loop Start .htaccess code to the Custom Code text box add this RewriteRule: RewriteRule ^shop/ - [L].  Your code should look something like the example below.
4.  Click the Save Root Custom Code button.
5.  Go to the BPS Security Modes page, click the Create secure.htaccess File AutoMagic button and activate Root folder BulletProof Mode.

Example:

# WP REWRITE LOOP START
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# WooCommerce /shop URI skip/bypass rule
RewriteRule ^shop/ - [L]

Since your site is using HTTPS/SSL you should be using HTTPS/SSL htaccess Rewrite code.  You can get that HTTPS/SSL Rewrite code here:  http://forum.ait-pro.com/forums/topic/wordpress-ssl-htaccess-code-rewrite-ssl-rewritecond-server_port/#post-7233

Example of what your code should look like after you have modified it and included your /shop Rewriterule if you choose to use this alternative method of whitelisting the entire /shop URI|URL.

# WP REWRITE LOOP START
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteCond %{SERVER_PORT} ^80
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule ^index\.php$ - [L]

# WooCommerce /shop URI skip/bypass rule
RewriteRule ^shop/ - [L]
  • This reply was modified 8 hours, 22 minutes ago by  AITpro Admin.

Viewing all articles
Browse latest Browse all 12473

Trending Articles