The environment is not allowed

My site is opening on my laptop but on my iPhone 14 PRO I get the message “The invironment is not allowed” from src/Http/Environment.php:245

		foreach ($allowed as $url) {
			// skip invalid URLs
			if (is_string($url) === false) {

			$uri = new Uri($url, ['slash' => false]);

			if ($uri->toString() === $this->baseUrl) {
				// the current environment is allowed,
				// stop before the exception below is thrown

		throw new InvalidArgumentException('The environment is not allowed');

I’m using v3.9.6 and PHP 8.1.22.

I don’t know enough to resolve this. I have a staging site that is working fine and I don’t see what the difference might be between the two.

Thanks for any help!

Is it a public site you are trying to open?

What is set as url option in your config.php?

    'url' => [

I have a redirect on but can turn that off if needed.

And which of these are you trying to open on your phone?

What sort of redirect? Where?

The redirect was at the cpanel. I have turned that off so the live public site is:

That’s what seems to give me the problem on my phone but opens on my laptop.

The staging site is available as well.

Thanks for your speedy responses!

The first link in your post opens fine on my iPhone 13.

Glad to hear that!

It looks like my phone and others are trying to open http:// and not https://

I’m guessing I need to check out some of my settings at my host.

Thanks for your help. I’ll check back in when I figure this out.

I did a rewrite rule in my htaccess file and that seems to have fixed it.

Don’t know why the staging site did not require this, but perhaps I will someday.

Thanks so much for your support!