Skip to content

Instantly share code, notes, and snippets.

@johnabela
Created February 25, 2017 01:57
Show Gist options
  • Save johnabela/b5a610a991df0c6eca32cee2c725a06c to your computer and use it in GitHub Desktop.
Save johnabela/b5a610a991df0c6eca32cee2c725a06c to your computer and use it in GitHub Desktop.
htaccess to allow domain.tld/usersname
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(register|contact|signin|policies) [NC]
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ /profile.php?id=$1 [L,QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment