开发者

codeigniter routing to another project?

I've 2 CI projects, i would like to link the URI together

say

/project1/controller_abc开发者_开发技巧/cdf to point -> /project2/controller/cdf (cdf function does not exist in the controller_abc, would just like to map that to project2)

Is it possible to do routing to another project in routes.php of the codeigniter framework ?


You might be able to something like that with an htaccess file

// check if the function/page is valid
RewriteCond %{DOCUMENT_ROOT}/project1/controller_abc/$1 !-f
// if it's not valid, go to the second project
RewriteRule  ^(.*)$  /project2/controller/$1  [L]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜