Skip to content

Instantly share code, notes, and snippets.

@benjamintanweihao
Created November 2, 2013 13:03
Show Gist options
  • Select an option

  • Save benjamintanweihao/7278677 to your computer and use it in GitHub Desktop.

Select an option

Save benjamintanweihao/7278677 to your computer and use it in GitHub Desktop.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RedirectMatch ^/$ http://www.longurl.com
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9A-Za-z]+)/?$ /yourls-go.php?id=$1 [L]
RewriteRule ^([0-9A-Za-z]+)\+/?$ /yourls-infos.php?id=$1 [L]
RewriteRule ^([0-9A-Za-z]+)\+all/?$ /yourls-infos.php?id=$1&amp;all=1 [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment