Answer the question
In order to leave comments, you need to log in
How to properly work with Yii htaccess and htpasswd?
The first time a window popped up, but the verification failed. Now I can not repeat the focus.
Explain on the fingers pliz.
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/mysite/.htpasswd
AuthGroupFile /dev/null
require valid-user
AddDefaultCharset utf-8
Options +FollowSymLinks
IndexIgnore */*
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
php_value post_max_size 10M
php_value upload_max_filesize 10M
php_value max_execution_time 200
php_value max_input_time 200
AddDefaultCharset utf-8
Options +FollowSymLinks
IndexIgnore */*
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
php_value post_max_size 10M
php_value upload_max_filesize 10M
php_value max_execution_time 200
php_value max_input_time 200
### force www
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteBase /
deny from all
Answer the question
In order to leave comments, you need to log in
Only applies to Yii
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question