Skip to content

Instantly share code, notes, and snippets.

@fadlisaad
Created August 10, 2016 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fadlisaad/f6cbaaf2ef980a0a3536957ec4f5004c to your computer and use it in GitHub Desktop.
Save fadlisaad/f6cbaaf2ef980a0a3536957ec4f5004c to your computer and use it in GitHub Desktop.
htaccess to nginx
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
location / {
if (!-e $request_filename){
rewrite ^(.+)$ /index.php?url=$1 break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment