課程
/后端開(kāi)發(fā)
/PHP
/Restful API實(shí)戰(zhàn)
請(qǐng)問(wèn)nginx rewrite 應(yīng)該怎么寫呢?
2017-07-25
源自:Restful API實(shí)戰(zhàn) 3-9
正在回答
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
if ($rule_0 = "21"){
rewrite /. /index.php;
RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/$1 [L]
本人親測(cè)
alexkuang 提問(wèn)者
舉報(bào)
PHP后端開(kāi)發(fā)者如何迎上移動(dòng)互聯(lián)網(wǎng)發(fā)展熱潮?
2 回答上傳文件該怎么處理?
1 回答請(qǐng)問(wèn)正式項(xiàng)目中前端怎么設(shè)置put delete這類的方法呢
1 回答DATETIME、TIMESTAMP 類型的字段分別應(yīng)該存儲(chǔ)什么格式的數(shù)據(jù)?
1 回答老師 請(qǐng)問(wèn) 怎么連上去的啊 phpstorm和UPUPW?
3 回答請(qǐng)問(wèn)一下create方法報(bào)錯(cuò)這是怎么回事
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-07-18
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite /. /index.php;
}
2017-07-26
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]
本人親測(cè)