1 回答

TA貢獻(xiàn)1864條經(jīng)驗(yàn) 獲得超2個(gè)贊
你可以這樣使用它:
RewriteEngine on
# Determine the RewriteBase automatically/dynamically in env variable BASE
RewriteCond $0#%{REQUEST_URI} ^([^#]*)#(.*)\1$
RewriteRule ^.*$ - [E=BASE:%2]
#allow installation
RewriteCond %{REQUEST_URI} !/_install [NC]
#redirect to _install if vendor does not exist
RewriteCond %{DOCUMENT_ROOT}%{ENV:BASE}vendor !-d
RewriteRule ^ %{ENV:BASE}_install [L,R=302]
#start application if vendor exists
#allow installation to continue
RewriteCond %{REQUEST_URI} !/_install
RewriteCond %{DOCUMENT_ROOT}%{ENV:BASE}vendor -d
RewriteRule ^(.*) public/$1 [L]
- 1 回答
- 0 關(guān)注
- 99 瀏覽
添加回答
舉報(bào)