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
HTTP/1.1 200 OK | |
Date: Fri, 27 Apr 2018 07:59:06 GMT | |
Content-Type: text/html; charset=UTF-8 | |
Connection: close | |
Set-Cookie: __cfduid=d047683e2225426554c96d71a9e7d21521524815946; expires=Sat, 27-Apr-19 07:59:06 GMT; path=/; domain=.evemilano.com; HttpOnly | |
Vary: Accept-Encoding | |
Link: <https://www.evemilano.com/wp-json/>; rel="https://api.w.org/" | |
X-Cache: HIT | |
Strict-Transport-Security: max-age=15552000; preload | |
X-Content-Type-Options: nosniff |
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
<!-- PWA & Push Service Worker --> | |
<script> | |
// If service workers are supported, and one isn't already registered | |
if ('serviceWorker' in navigator && !navigator.serviceWorker.controller) { | |
navigator.serviceWorker.register('/OneSignalSDKWorker.js'); | |
console.log("OneSignalSDKWorker.js loaded..."); | |
} | |
</script> |
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
importScripts('https://www.evemilano.com/sw.js'); | |
importScripts('https://cdn.onesignal.com/sdks/OneSignalSDK.js'); |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
gzip on; | |
gzip_comp_level 5; | |
gzip_min_length 256; | |
gzip_proxied any; | |
gzip_vary on; |
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 permalink "Day and Name (/%year%/%monthnum%/%day%/%postname%/)" to "postname" | |
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://www.yourwebsite.com/$4 | |
## From permalink "Month and Name (/%year%/%monthnum%/%postname%/)" to "postname" | |
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ http://www.yourwebsite.com/$3 | |
## From permalink "Numeric (/archives/%post_id%)" to "postname" | |
RedirectMatch 301 ^/archives/(\d+)$ http://www.yourwebsite.com/?p=$1 |
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
<?php | |
/* | |
Plugin Name: EVE Dynamic Prerender Meta Tag | |
Plugin URI: https://www.evemilano.com/2017/11/wp-prerender-plugin/ | |
Version: 3.5.3 | |
Description: This WordPress plugin creates and inject into HTML head a Dynamic Prerender Meta Tag. The system stores users navigational paths inside the database e retrieve the most common next visited page as prerender meta tag. If the plugin doesn't has data for the next probable page, it will show a prerender to the homepage. The database table WILL BE REMOVED automatically when the plugin is uninstalled but not when disabled. Do not remove the plugin if you want to keep data. The database table can grow up a lot in large websites, keep an eye on it! | |
Author: Giovanni Sacheli | |
Author URI: https://www.evemilano.com/ | |
*/ | |
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
/* 410 STATUS CODE */ | |
add_filter( 'rest_authentication_errors', function( $result ) { | |
if ( ! empty( $result ) ) { | |
return $result; | |
} | |
if ( ! is_user_logged_in() ) { | |
return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) ); | |
} | |
return $result; | |
}); |
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
<script> | |
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('/sw.js') | |
.then(function(registration) { | |
console.log('Registration successful, scope is:', registration.scope); | |
}) | |
.catch(function(error) { | |
console.log('Service worker registration failed, error:', error); | |
}); | |
} |
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="manifest" href="/manifest.json"> |