Skip to content

Instantly share code, notes, and snippets.

@brentini
Forked from iambriansreed/lets-encrypt-index.php
Last active March 23, 2018 21:31
Show Gist options
  • Save brentini/2957c3b0a283e7c5aafcf95c0b63a3c2 to your computer and use it in GitHub Desktop.
Save brentini/2957c3b0a283e7c5aafcf95c0b63a3c2 to your computer and use it in GitHub Desktop.
Add this to the beginning of your index.php file. Useful when adding SSL to Wordpress applications. #wordpress
$request = 'code_in_the_url';
$response = 'code_returned';
if ( $_SERVER['REQUEST_URI'] === ( '/.well-known/acme-challenge/' . $request ) ) {
echo $request . '.' . $response;
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment