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
# This code must be placed in the .htaccess | |
# file that is located in the root directory | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^([^.]+?)/?$ /$1.html [L,R=301] |
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
$('a[href*="//"]:not([href*="'+ location.hostname +'"])').attr('target','_blank'); |
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
// Find all YouTube videos | |
var $allVideos = $("iframe[src^='//www.youtube.com']"), | |
// The element that is fluid width | |
$fluidEl = $("body"); | |
// Figure out and save aspect ratio for each video | |
$allVideos.each(function() { | |
$(this) |
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
<?php | |
/* | |
Plugin Name: Event Custom Post Type | |
Plugin URI: http://wpbeaches.com/create-custom-post-types-in-genesis-child-theme-in-wordpress/ | |
Description: Custom Post Types for Event | |
Author: Neil Gee | |
Version:1 | |
Author URI:http://wpbeaches.com | |
*/ |
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
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^subdomain\.example\.com$ [OR] | |
RewriteCond %{HTTP_HOST} ^www\.subdomain\.example\.com$ | |
RewriteRule ^/?$ "http\:\/\/www\.example\.com\/subdomain\/" [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
# prevent directory browsing | |
Options All -Indexes |
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
for i in */; do zip -r "${i%/}.zip" "$i"; done |
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
{ | |
"Version": "2008-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowPublicRead", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:GetObject", |
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 to https | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP_HOST} example\.com$ [NC] | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] | |
# Redirect to http | |
RewriteCond %{HTTPS} on | |
RewriteCond %{HTTP_HOST} example\.com$ [NC] | |
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] |
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
<ifModule mod_expires.c> | |
ExpiresActive On | |
# Expiration can be defined by years, months, weeks, days, hours, minutes, and seconds | |
# CSS | |
ExpiresByType text/css "access plus 1 week" | |
# Data | |
ExpiresByType application/atom+xml "access plus 1 hour" | |
ExpiresByType application/rdf+xml "access plus 1 hour" |
NewerOlder