Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$config['force_uri'] = "domain.com"; #5511

Closed
smtalk opened this issue Nov 12, 2016 · 3 comments
Closed

$config['force_uri'] = "domain.com"; #5511

smtalk opened this issue Nov 12, 2016 · 3 comments

Comments

@smtalk
Copy link

smtalk commented Nov 12, 2016

It'd be great to have an ability to set domain which roundcube should redirect to. When having a global alias in apache configuration, it's not possible to do that without changing apache config or RoundCube .htaccess. A simple configuration option:
$config['force_uri'] = 'domain.com';

Would solve it.

Change to index.php:
Find:
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);

Replace with:
$host = preg_replace('/:[0-9]+$/', '', $RCMAIL->config->get('force_uri', $_SERVER['HTTP_HOST']));

@alecpl
Copy link
Member

alecpl commented Nov 12, 2016

I'd rather extend meaning of force_https, so it can contain host:port value. Patches welcome.

@ArvydasRumsa
Copy link

patch.txt

Added host support for $force_https configuration option to redirect to a specified domain.

@alecpl
Copy link
Member

alecpl commented Nov 20, 2016

Thanks. I modified the code slightly.

@alecpl alecpl closed this as completed Nov 20, 2016
@alecpl alecpl modified the milestones: 1.3-beta, later Nov 20, 2016
ZiBiS added a commit to ZiBiS/roundcubemail that referenced this issue Nov 23, 2016
* 'master' of https://github.com/roundcube/roundcubemail: (31 commits)
  Fix write_log() return value when using syslog() and it fails
  Fix alignment of error icon
  Fix _from argument validation
  A better alignment/positioning of icons on widescreen list
  Update changelog
  Revert some style changes to correctly position status icon in threaded messages view of widescreen mode
  Always send columns list as array (unsetting items makes it an object with numeric keys)
  Adjust sizes and spacings in new 3-column layout
  Support hostname and hostname:port in force_https option (roundcube#5511)
  Fix displaying attached images with wrong Content-Type specified (roundcube#5527)
  Fix missing content check when image resize fails on attachment thumbnail generation (roundcube#5485)
  Make sure $prefs property is an array (roundcube#5523)
  Fix storing "empty" values in rcube_cache/rcube_cache_shared (roundcube#5519)
  replace old trac links (roundcube#5514)
  Enigma: Don't log bad-passphrase errors
  Require Crypt_GPG 1.6.0
  Update README with some GnuPG 2.1 support info
  GnuPG 2.1: Fix secret keys export
  write_record() should return boolean value
  Code simplification
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants