I have installed Yii2 advanced app and what i am trying to do now is to redirect this url htpp://site/admin
to the backend ( admin ) side. What i tried so far is:
AddDefaultCharset utf-8
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# Make the backend accessible via url: http://site/admin
RewriteRule ^admin$ $admin.php [L]
# 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
RewriteRule ^static - [L]
I am not familiar whit .htaccess
and i am not pretty sure what is the right way. This code is what i found after googling. The .htaccess
file is in the app/backend/web/.htaccess
. Can you point me the right way? Thank you in advance!