+1.888.407.5769
+707.234.5769

Join the Community

By Joining, you can submit your own questions and reply to other member threads.

Join Today

www vs non-www

We recently introduced a web application firewall around our site. One of the effects of this is that all traffic is forced to www rather than non-www.

Evidently, jRox was misconfigured for this change as we have problems with login screens ( and possibly cookies ). Login is not possible for affiliates. The login screen to admin has a redirect loop. Not sure about cookies in general yet.

So, what is that solution?

I am a progeammer but have absolutely no knowledge of jRox so some help and advice would be appreciated. Presumably there is a configuration file somewhere? Is this all I need to change?

Thanks in advance


Nick

JROX Staff Posted a reply 3 years ago

you can open up the /system/application/config/config.php file and edit the subdomain option:

$config['base_subdomain_name'] = 'www';

$config['base_url'] = 'http://' . $config['base_subdomain_name'] . '.' . $config['base_domain_name'] . $config['base_folder_path'];
$config['base_SSL_url'] = 'https://' . $config['base_subdomain_name'] . '.' . $config['base_domain_name'] . $config['base_folder_path'];


change to:

$config['base_subdomain_name'] = '';

$config['base_url'] = $config['base_domain_name'] . $config['base_folder_path'];
$config['base_SSL_url'] = 'https://' . $config['base_domain_name'] . $config['base_folder_path'];

nickq Posted a reply 3 years ago

that does not work, unfortunately.

I have resorted to hard coding the base_url and base_SSL_url but still can't get the settings to work. Results of various options are shown below.



============================
1. Starting Point

$config['base_domain_name'] = 'www.ourdomain.co.uk';
$config['base_subdomain_name'] = '';
$config['base_url'] = 'http://www.ourdomain.co.uk/affiliates';
$config['base_SSL_url'] = 'https://www.ourdomain.co.uk/affiliates';

results in redirect loop
final URL is
https://www.ourdomain.co.uk/affiliates/admin_login/index

============================
2. just to show that https is forced by jRox

$config['base_domain_name'] = 'www.ourdomain.co.uk';
$config['base_subdomain_name'] = '';
$config['base_url'] = 'http://www.ourdomain.co.uk/affiliates';
$config['base_SSL_url'] = 'http://www.ourdomain.co.uk/affiliates';

results in redirect loop
final URL is
http://www.ourdomain.co.uk/affiliates/admin_login/index

============================
3. base domain change

$config['base_domain_name'] = 'ourdomain.co.uk';
$config['base_subdomain_name'] = '';
$config['base_url'] = 'http://www.ourdomain.co.uk/affiliates';
$config['base_SSL_url'] = 'https://www.ourdomain.co.uk/affiliates';

results in redirect loop
final URL is
https://www.ourdomain.co.uk/affiliates/admin_login/index

============================
4. sudomain change

$config['base_domain_name'] = 'www.ourdomain.co.uk';
$config['base_subdomain_name'] = 'www';
$config['base_url'] = 'http://www.ourdomain.co.uk/affiliates';
$config['base_SSL_url'] = 'https://www.ourdomain.co.uk/affiliates';

results in redirect loop
final URL is
https://www.ourdomain.co.uk/affiliates/admin_login/index

============================
5. subdomain change and base change

$config['base_domain_name'] = 'ourdomain.co.uk';
$config['base_subdomain_name'] = 'www';
$config['base_url'] = 'http://www.ourdomain.co.uk/affiliates';
$config['base_SSL_url'] = 'https://www.ourdomain.co.uk/affiliates';

results in redirect loop
final URL is
https://www.ourdomain.co.uk/affiliates/admin_login/index

============================

LATEST NEWS

Scanned and Verified

Security Seal
Certified by Trust Guard
Privacy Verified Seal
Business Seal