This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<!-- test this at https://jsfiddle.net/lyquix/j3sss39o/ --> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
.grid { | |
border: 1px solid #000; | |
position: relative; | |
} |
This file contains 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
# Redirect domain to www # | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC] | |
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] |
This file contains 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
# Redirect domain to page in another domain # | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www.spanish.com$ [NC] | |
RewriteRule ^(.*)$ http://www.example.com/spanish [R=301,L] |
This file contains 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
# Redirect multiple domains to another domain # | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^espanol.com$ [OR,NC] | |
RewriteCond %{HTTP_HOST} ^deutsch.com$ [OR,NC] | |
RewriteCond %{HTTP_HOST} ^suomi.com$ [NC] | |
RewriteRule ^(.*)$ http://www.example.com/international [R=301,L] |
This file contains 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 domain to SSL # | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L] |
This file contains 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 directory to SSL # | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteCond %{REQUEST_URI} ^/phpmyadmin/? | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L] |
This file contains 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
# Redirect domain to www and force SSL # | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www.example.com$ [OR,NC] | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L] |
This file contains 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
# Maintenance Redirect | |
RewriteEngine On | |
RewriteCond %{REMOTE_ADDR} !^123\.45\.67\.89$ | |
RewriteCond %{REQUEST_URI} !.*\.(css|jpg|jpeg|gif|png|svg|js) [NC] | |
RewriteCond %{REQUEST_URI} !/maintenance.html$ | |
RewriteRule .* /maintenance.html [R=503,L] |
This file contains 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
/* | |
equalHeightRows | |
Provides a method for setting equal height for elements in the same row | |
Requires jQuery | |
Add class equalheightrow to elements that you want affected by this script | |
On document ready run equalHeightRows.init(), optionally pass custom settings |
This file contains 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
// returns the browser name, type and version, and sets body classes | |
// detects major browsers: IE, Edge, Firefox, Chrome, Safari, Opera, Android | |
// based on: https://github.com/ded/bowser | |
// list of user agen strings: http://www.webapps-online.com/online-tools/user-agent-strings/dv | |
function getBrowser(){ | |
var ua = navigator.userAgent, browser; | |
// helper functions to deal with common regex | |
function getFirstMatch(regex) { | |
var match = ua.match(regex); |
OlderNewer