Skip to content

Instantly share code, notes, and snippets.

@fongfan999
Created December 1, 2016 15:42
Show Gist options
  • Save fongfan999/6bce38fe98c7b9f9ca2a35454ca48da5 to your computer and use it in GitHub Desktop.
Save fongfan999/6bce38fe98c7b9f9ca2a35454ca48da5 to your computer and use it in GitHub Desktop.
Enable pretty url in Yii2
RewriteEngine on
# If a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward it to index.php
RewriteRule . index.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment