We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Expression Engine Login form for protected page redirects to a different URL

How Do I?

TN_GSO's avatar
TN_GSO
11 posts
5 years ago
TN_GSO's avatar TN_GSO

Hi there!

When I use the Expression Engine form on a multisite site, when it logs in it redirects to a URL of another site in the multisite and fails, and I can’t figure out why. Click back, refresh the page though and I’m logged in.

The form:

{exp:member:login_form action="https://www.domainA.com" return="https://domainA.com/index"}

<label>Username</label>

<input type=”text” name=”username” value=”” maxlength=”32” size=”25” />

<label>Password</label>

<input type=”password” name=”password” value=”” maxlength=”32” size=”25” />

<input type=”submit” name=”submit” value=”Submit” /></p>

{/exp:member:login_form}

When logging in, I get a 404:

Hmmm… can’t reach this page www.domainB.com%20’s server IP address could not be found. The URL it tries to access is https://www.domainB.com%20/?ACT=21&RET=aHR0cHM6Ly93d3cuZ2V0c2FmZW9ubGluZS5vcmcuam0vYW1iYXNzYWRvcnJlc291cmNlcy9pbmRleA–&cur=1&orig=0&multi=788cb55d8c71c481bdb2f2e0ecf2ce6e&orig_site_id=14

ps DomainA.com is site_id 14.

Pulling up dev tools, it looks like it is trying to set a cookie for domainB.com, but I simply can’t understand why lol

Any help appreciated!

Mat

       
TN_GSO's avatar
TN_GSO
11 posts
5 years ago
TN_GSO's avatar TN_GSO

Worked it out. Seems like the $config[multi_login_sites} setting wasn’t working as I expected it would according to the documentation. Commented it out, works fine now.

? 1
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.