开发者

codeigniter routing to another project?

开发者 https://www.devze.com 2023-02-28 17:13 出处:网络
I\'ve 2 CI projects, i would like to link the URI together say /project1/controller_abc开发者_开发技巧/cdf to point -> /project2/controller/cdf

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

精彩评论

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