This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteCond %{HTTPS} !=on | |
| RewriteCond %{HTTP_HOST} ^domain\.com | |
| RewriteRule ^ http://www.domain.com%{REQUEST_URI} [L,R=301] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (!window.console||!console.log)&&function(){for(var c=function(){},a="assert clear count debug dir dirxml error exception group groupCollapsed groupEnd info log markTimeline profile profileEnd markTimeline table time timeEnd timeStamp trace warn".split(" "),b=a.length,d=window.console={};b--;)d[a[b]]=c}(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| // Snippet from: http://net.tutsplus.com/tutorials/php/understanding-hash-functions-and-keeping-passwords-safe/ | |
| /* ---- Defining the Class ---- */ | |
| class PassHash { | |
| // blowfish | |
| private static $algo = '$2a'; | |
| // cost parameter | |
| private static $cost = '$10'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^((?!REGEX).)*$\n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # FORCE WWW ON ALL PAGES | |
| RewriteCond %{HTTP_HOST} !^www\.(.+) | |
| RewriteCond %{HTTPS}s ^(on(s)|offs) | |
| RewriteRule ^ http%2://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Found at: http://jsfiddle.net/BjpWB/4 | |
| function scrollToAnchor(aid){ | |
| var aTag = $("a[name='"+ aid +"']"); | |
| $('html,body').animate({scrollTop: aTag.offset().top},'slow'); | |
| } | |
| scrollToAnchor('id3'); | |
| function scrollTo($element){ | |
| $('html,body').animate({scrollTop: $element.offset().top},'slow'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in the regex, the carrot(^) negates the match, so if the stringToReplace contains something that is not a-z or 0-9 it will be replaced | |
| // In this case the desired string will only be alpha numeric characters, stripping out spaces and symbols | |
| // Help from: http://stackoverflow.com/questions/4374822/javascript-regexp-remove-all-special-characters | |
| var desired = stringToReplace.replace(/[^a-zA-Z0-9]/gi, '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### SOURCE: http://stackoverflow.com/questions/6847649/htaccess-help-need-to-force-www-https-and-remove-index-php | |
| ### Force WWW: | |
| RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC] | |
| RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L] # include 's' here to force ssl in addition to www | |
| ### Force SSL: | |
| RewriteCond %{SERVER_PORT} 80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="stylesheet" href="css/styles.css?v=<mvt:eval expr="stime('/mm5/css/styles.css')"/>"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # From: http://www.unitedforums.co.uk/vb/website-development-scripting/10926-how-block-wget.html | |
| # Turn on mod_rewrite | |
| RewriteEngine On | |
| # Block undesirable requests in general | |
| RewriteCond %{THE_REQUEST} ^GET\ http [NC,OR] | |
| # Block undesirable requests specifically | |
| RewriteCond %{REQUEST_URI} cs\.txt?$ [OR] |