.htaccess Rules for Site Verification

Here’s two .htaccess Rewrite rules from my toolbox that have made my life simpler, and I figured they could help others as well.

These short tutorials assume:

  • You have ftp access to your site
  • Your site is running Apache
  • Apache has the mod_rewrite.c module enabled (most installations do)
  • You have permission to create and edit a site-level .htaccess file

Let’s Encrypt

.well-known/acme-challenge/long-random-id

Recently, I was asked to post a Let’s Encrypt verification file for a site that was changing hosts.
The old host doesn’t allow access to “hidden” folders. (Files and folders that start with a dot.)
Any attempt to pull up the URL results in 403 Forbidden.

To avoid having the server attempt to access a hidden folder, I just rewrite the incoming URI to something the server CAN access.

Step 1: Create folder for your verification files

I called mine “lets_encrypt.”

Step 2: Upload the verification file to that folder

It’s that file with the gibberish name you got from Let’s Encrypt.

Step 3: Add a rewrite rule to .htaccess

RewriteEngine On
# Let's Encrypt validation server-side rewrite to work around
# hosting limitation about hidden folders.
RewriteRule ^\.well-known/acme-challenge/(.*)$ /letsencrypt/$1 [L]

 

Put this rule towards the top of your .htaccess file before any rewrites for WordPress or caching programs.

Google Property Verification

Many Google services require you to verify your property.

One of the simplest methods is to upload a file, but some modern publishing or hosting environments sometimes have issues serving up a simple file.

And you may not want those HTML files cluttering up your root directory.

An Apache Rewrite rule  can solve this problem.

Step 1: Create a folder for your verification files

I called mine “google_verify”

Step 2: Upload the verification file to that folder

This is the file you get from the “HTML file upload” verification method.

Step 3: Add a rewrite rule to .htaccess

RewriteEngine on
RewriteRule "^/?.*?(google[0123456789abcdef]+\.html).*$" "%{DOCUMENT_ROOT}/google_verify/$1" [L]

Put this rule towards the top of your .htaccess file before any rewrites for WordPress or caching programs.

 

Step 4: Profit!

Now whenever you need to verify a property , you can just drop the  file in the appropriate folder.

Or better yet, hand off that task to someone else who has ftp access…

World of Warcraft Dreadblades: Part 1: The Plan

I want some real-world Dreadblades.

I’ve been doing serious prop building for a couple years and should be able to make them out of EVA foam.

I’m not a fan of most of the Artifact Weapons in World of Warcraft “Legion.” I could rant about talent trees and silly models for hours.

But the Outlaw Rogue Dreadblades…

Ah… There’s something I can get behind. Sure, all those spikes and teeth will cut the wielder as well as the target, but they just look cool.

This is more elaborate than any of my previous builds, so I practiced my patterning and foam fabricating by creating a more normal saber.

saber-and-dagger

Then I made the commitment in public:

I then promised a friend they could have the Dreadblades to play with at BlizzCon. We are fully committed! Let the panic begin!

Materials should be very straightforward for this build:

  • EVA foam for almost everything
  • Poly pressure pipe for handle
  • 3D PLA prints for the skulls
  • PETG plastic sheet to suspend the “floating” bits
  • Neopixels and Trinkets for lighting effects

We’ve made the emotional commitment. Time for the financial commitment:

  •  A trip to Home Depot for some floormats and Weldwood contact adhesive, silver spray paint, and the pressure pipe
  • A few large sheets of EVA foam from TNT Cosplay Supply.
  • A gallon of Creature Cast neoprene rubber to use as foam sealer.
  • Amazon order for gold and bronze acrylic paint. Rubber spikes and spray varnish.

In Part 2, we’ll create the patterns and figure out the mechanics while we wait for materials to arrive.