Skip to content

Instantly share code, notes, and snippets.

View MichaelZelensky's full-sized avatar

Michael Zelensky MichaelZelensky

View GitHub Profile
@lazysod
lazysod / canonical.php
Created May 22, 2014 10:29
Generate a canonical URL using PHP
<link rel="canonical" href="http://www.website.com<?php echo parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH);?>">