0

Hi I have found this code about the trailling slash and it works perfect.

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [L,R=301]

RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^index.php
RewriteCond %{REQUEST_URI} !\.(html|jpg|png|gif)$
RewriteRule ^(.*)$ $1/ [L,R=301]

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php [L]

</IfModule>

My problem is that it doesn't work properly the add to cart button. In my site when i push the add to cart then shows a pop up and inside the popup shows 2 buttons. "Continue Shopping" and "View cart and checkout".

Now when i click the add to cart it shows the pop up but instead of the buttons it shows the message "error".

Can someone help me ?

regards

0

I have found a solution. I removed all the above code and i have add the bellow.

RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]

it works properly, adds the trailling slash and everything work like it should.

  • If you think your answer best answers your question please accept it when you'll be able to. – Julien Lachal Jun 28 '16 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.