Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Altering BASE_HREF (to change domain name) breaks admin logins


Go to End


1127 Views

Avatar
gavinmc

Community Member, 1 Post

3 June 2011 at 12:47am

Edited: 03/06/2011 12:48am

Hi,

we have a Silverstripe v2.3 site on a vhost with a ServerName and a couple of ServerAliases for various reasons. It's important that the site is constructed using the ServerName throughout. However, at least one of the admins tends to access the site using one of the ServerAliases which causes that ServerAlias to appear in the links on the site. This is not desirable.

To counter this, I explicitly used setBaseURL() in sapphire/_config.php to set the ServerName. This works fine, but when I have that set, nobody can login to the admin. Does anyone know why that would be?

I'm having trouble finding ways to debug this. The SSLog class isn't available in v2.3, so I'm a little lost.

Gavin