How to resolve .htaccess proxy redirect problems in WordPress

Solution 1:
Try changing the image and icon URLs in the Advanced Layer Slider from relative paths to absolute URLs (as defined in RFC 2396
).

Once the URLs are absolute, you can safely use the [P] flag in your .htaccess file again.

Note: Many plugins output content using relative paths, which can sometimes cause issues like this.

Solution 2:
The following .htaccess code handles WordPress permalinks. Make sure to keep the # BEGIN WordPress and # END WordPress lines so WordPress can locate and modify this section as needed:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

For your other custom section, remove the trailing slash after folder2 in your proxy rule:

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/folder
RewriteRule ^(.*)$ http://www.domainB.com/folder1/folder2 [P]