Another Redirect Issue

Permalink Browser Info Environment
Hi Jon,

I'm hoping you can help troubleshoot another endless redirect problem. I've searched the forums and found a couple of different suggestions on fixes, but none of them are working.

I can browse my site using https, so I know that's working. It's just the redirect that seems to be the issue.

I'm on 5.5.1 and 2.1 of Force SSL.


My site.php contains:
define('BASE_URL', '');
define('DIR_REL', '');
define('DIRNAME_APP_UPDATED', 'concrete5.5.1');

My .htacess looks like:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule ^(.*)$ index.php/$1 [L]

url_check.php looks like:

defined('C5_EXECUTE') or die("Access Denied.");
if (REDIRECT_TO_BASE_URL == true) {
   $protocol = 'http://';
   $base_url = BASE_URL;
   if (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']) && ($base_url_ssl = Config::get('BASE_URL_SSL'))) {
      $protocol = 'https://';
      $base_url = $base_url_ssl;
   $uri = $_SERVER['REQUEST_URI'];
   if (strpos($uri, '%7E') !== false) {
      $uri = str_replace('%7E', '~', $uri);
   if (($base_url != $protocol . $_SERVER['HTTP_HOST']) && ($base_url . ':' . $_SERVER['SERVER_PORT'] != 'https://' . $_SERVER['HTTP_HOST'])) {
      header('HTTP/1.1 301 Moved Permanently');

Type: Discussion
Status: New
View Replies:
jbx replied on at Permalink Reply
Hi Mike,

something don't look quite right, as I can browse your site in http and
https. The redirect should prevent that...

Couple of things to try. First, make sure you are using the stock
url_check.php that comes with 5.5.1. That should work fine.

Second, remove the define's for BASE_URL and DIR_REL from site.php.

I should point out that neither of those things are likely to solve the
issue, just getting it back to how v5.5.1 is as standard, so we know where
we're starting from.

Then head to the dashboard.
(sorry for shouting, but that bit's important ;->)

Then uninstall the addon and clear the cache (twice).
Then reinstall the addon and again clear the cache (twice)

I know, shouldn't have to clear the cache twice, but even if you have it
switched off, it still caches the config in the db and sometimes seems to
take a couple of attempts to clear it. The important part for the addon to
work correctly is in the db config. I'm now setting BASE_URL_SSL in there
when the addon is installed. If that gets set wrong at install time, then
it wil cause havoc. V2.2 will have a dashboard panel to check for that and
update it in a more user friendly way :)

Hopefully that will solve the issue. Shout back and let me know how you get


On 29 March 2012 19:43, concrete5 Community <>wrote:
mikewaz replied on at Permalink Reply
Thanks for the quick reply Jon!
I'm going to be tied up for the next few hours, but will give this a try and get back to you today, tomorrow latest.
mikewaz replied on at Permalink Reply
Hi Jon,

Again, thanks for you help with this. I was hoping that this would fix things and I carefully followed your directions, but I still have the problem.

This is a dev server, so I don't mind PMing you details so that you can check it out yourself. Would that help?

jbx replied on at Permalink Reply
yes please - db and dashboard access would be ideal...


On 29 March 2012 23:29, concrete5 Community <>wrote:
mikewaz replied on at Permalink Reply
No problem. Going into a meeting now, but will do this this evening. Want FTP access too?

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.