RewriteEngine On
RewriteBase /
ErrorDocument 404 /404.html
# Nicer URL for share buttons
RewriteRule ^share/?$ /cgi/share.php [NC,L]