开发者

Why is this simple rewriterule failing to function?

I have two rules to redirect to relevant front controllers:

RewriteRule ^api/?.*$ api.php [NC,L]
RewriteRule ^.*$ web.php [NC,L]

Is there a reason why local开发者_如何学JAVAhost/api/a fails to be caught by the first rule?


Try this:

If its in the root,

RewriteBase /
RewriteRule ^api/?.*$ api.php [NC,L]
RewriteRule ^.*$ web.php [NC,L]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜