0

enter image description hereI want to force the browser to change the "www" path to "https://" via the .htaccess, it works more or less on all other (main directory) pages but when you get to the product article itself(sub directory) the .htaccess doesnt work at all.

The customers can't shop correctly because ajax wont work, so no products get injected into the shopping cart.

Here's my .htaccess:

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

# WordPress SEO - XML Sitemap Rewrite Fix
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
</IfModule>

# GZip Ninja Speed -- Starts here
# Do not write anything between "GZip Ninja Speed -- Starts" and "GZip Ninja Speed -- Ends"
# It will be deleted while uninstalling GZip Ninja Speed plugin
AddOutputFilterByType DEFLATE text/plain #GZip Ninja Speed
AddOutputFilterByType DEFLATE text/html #GZip Ninja Speed
AddOutputFilterByType DEFLATE text/xml #GZip Ninja Speed
AddOutputFilterByType DEFLATE text/css #GZip Ninja Speed
AddOutputFilterByType DEFLATE application/xml #GZip Ninja Speed
AddOutputFilterByType DEFLATE application/xhtml+xml #GZip Ninja Speed
AddOutputFilterByType DEFLATE application/rss+xml #GZip Ninja Speed
AddOutputFilterByType DEFLATE application/javascript #GZip Ninja Speed
AddOutputFilterByType DEFLATE application/x-javascript #GZip Ninja Speed
AddType x-font/otf .otf #GZip Ninja Speed
AddType x-font/ttf .ttf #GZip Ninja Speed
AddType x-font/eot .eot #GZip Ninja Speed
AddType x-font/woff .woff #GZip Ninja Speed
AddType image/x-icon .ico #GZip Ninja Speed
AddType image/png .png #GZip Ninja Speed
# GZip Ninja Speed -- Ends here

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# enforce https
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.manufaktur13.de/$1 [R,L]
</IfModule>

I also added a picture of whats happening. If you want to try it by yourself heres a link to the live shop: www.manufaktur13.de/shop/backpacks/vagabond-wood-sports-bag/

try to click the "love" button(little heart) or try adding a product and watch the console.

Thx in advance and sorry for my bad english

Bill Bronson
  • 530
  • 2
  • 9
  • 24
  • My console just show a 404 File not found for /wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js. Kasse is working correctly. I can love products and add them to Cart. AJAX is not working with "Add Product", as it reloads the site. – agustin Nov 10 '15 at 12:03
  • like I said, try clicking the "love" button or add product and go to checkout (kasse) -> watch console – Bill Bronson Nov 10 '15 at 12:05
  • It works on Chrome Version 46.0.2490.80 m. I can go to Kasse (it detects https) and do an Order (already send with Testmuster). If you want, I can send you a video from the Customer Journey side. Maybe it helps you to find where the problem could be by your side. – agustin Nov 10 '15 at 12:43
  • mhh strange. but why the .htaccess does not force to https when you just type in the adress without http:// ? thx for your efforts – Bill Bronson Nov 10 '15 at 12:48
  • 1
    You should probably put the part that rewrites to HTTPS on top of the htaccess file, rather then having it below the stuff created by WordPress. – CBroe Nov 10 '15 at 12:50
  • did you try this: http://stackoverflow.com/questions/4398951/force-ssl-https-using-htaccess-and-mod-rewrite instead of {SERVER_PORT} ? – Mat Nov 10 '15 at 13:13
  • I tried both of your suggestions. it seems to work in chrome now but firefox still doesnt force to https :( – Bill Bronson Nov 10 '15 at 13:21

0 Answers0