Skip to content

Instantly share code, notes, and snippets.

Todd Hooper thoop

  • Telluride, Co
Block or report user

Report or block thoop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thoop
thoop / gist:6be274259bdeee4e2363e008577bff2a
Last active Oct 18, 2018
Prerender.io IIS web.config
View gist:6be274259bdeee4e2363e008577bff2a
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!--# Only proxy the request to Prerender if it's a request for HTML-->
<rule name="Prerender" stopProcessing="true">
<serverVariables>
<set name="HTTP_X_PRERENDER_TOKEN" value="[...your token...]" />
</serverVariables>
View gist:3d3589171f2bb01d29237d0d49961d5f
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
# Generate $prerender_ua bool value based on user agent
# indexation bots will get this as 1,
# prerender user agent will always get 0 (avoid loops)
map $http_user_agent $prerender_ua {
default 0;
@thoop
thoop / nginx.conf
Last active Jul 12, 2019
Official prerender.io nginx.conf for nginx
View nginx.conf
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@thoop
thoop / .htaccess
Last active Jul 7, 2019
Official prerender.io .htaccess for Apache.
View .htaccess
# Change YOUR_TOKEN to your prerender token
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
You can’t perform that action at this time.