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

get_base_tag returns is strange


Go to End


2 Posts   828 Views

Avatar
coastalwanderer

Community Member, 2 Posts

28 December 2013 at 7:58pm

Edited: 28/12/2013 7:59pm

I was looking at the results of <% base_tag %> in SilverStripe 3.1.2. It is returning a address string plus index.php. That is, it is returning http://www.example.com/index.php. Was this intentional? I was expecting it to return http://www.example.com.

I see that the value is generated in get_base_tag() in SSViewer.php. I want to change this to return only the path, but, I am afraid to change this in the case that there is some reason that the index.php is actually being included in the return value.

Does anyone know why this value is being returned for the <base> tag?

Avatar
Willr

Forum Moderator, 5523 Posts

3 January 2014 at 6:37pm

If you have RewriteBase enabled and working then you shouldn't have that index.php there (unless you accessed the site through index.php in the URL). Could also try hard code the base URL

define('BASE_URL', ..);