开发者

CakePHP Base Url with Query String

I'm having an issue with one of my cake apps. It's actually pretty custom, so I'm not surprised Cake isn't handling this very special case gracefully.

I want开发者_高级运维 my application to have a baseUrl = 'addonmodules.php?module=phusion'

I've tried a few variations of the change in my config.php:

Configure::write('App.baseUrl', env('SCRIPT_NAME').'?module=phusion'); Configure::write('App.baseUrl', env('SCRIPT_NAME').'?module=phusion&url='); Configure::write('App.baseUrl', env('SCRIPT_NAME').'?module=phusion'); Configure::write('App.baseUrl', env('SCRIPT_NAME').'?module=phusion&url=');

but I can't seem to be able to get this to work. Any assistance with this would be much appreciated.

If you need more information I'd be happy to provide it.


Had a similar issue:

Add this lines in config/core.php:

Configure::write('App.baseUrl', 'addonmodules.php?module=phusion');
Configure::write('App.base', '/path/to/webroot/');

also you may need to manually set the the url parameter

if(!isset($_GET['url'])) $_GET['url'] = '/';

I know this is an old question, but stumbled myself into something similar and hope it would be useful. Thanks to ADmad from #cakephp for his help in making this work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜