Skip to content

Instantly share code, notes, and snippets.

@ptflp
Created March 14, 2018 06:54
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 ptflp/50ccdae9895aac97d871676928d6fbbf to your computer and use it in GitHub Desktop.
Save ptflp/50ccdae9895aac97d871676928d6fbbf to your computer and use it in GitHub Desktop.
Yii2 advanced app htaccess for frontend and backend
# use mode rewrite for pretty URL support
RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment