Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkCoupon(str){
- if (window.XMLHttpRequest) {
- // code for IE7+, Firefox, Chrome, Opera, Safari
- xmlhttp=new XMLHttpRequest();
- } else { // code for IE6, IE5
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- xmlhttp.onreadystatechange=function() {
- if (this.readyState==4 && this.status==200) {
- alert('success');
- }
- }
- xmlhttp.open("GET","https://www.example.com/inc/checkCoupon?id=45&coupon="+str,true);
- xmlhttp.send();
- }
- #Rewrite everything to https
- RewriteEngine On
- RewriteCond %{HTTPS} !=on
- RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- RewriteCond %{HTTP_HOST} !^www. [NC]
- RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
- RewriteCond %{HTTPS} !=on
- RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- RewriteBase /
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_URI} !(.*)/$
- RewriteRule ^(.*)$ http://www.example.com/$1/ [L,R=301]
Add Comment
Please, Sign In to add comment