Htaccess File

hucongyang/yii/master/api/web/.htaccess

HTTP_HOST, REQUEST_FILENAME
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
RewriteCond %{HTTP_HOST} ^51siyuan.cn
RewriteRule ^(.*)$ http://www.51siyuan.cn/$1 [R=permanent,L]
Exit mobile version