Jump to:

23355 Posts in 17734 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » get_base_tag returns is strange

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

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

Page: 1
Go to End
Author Topic: 223 Views
  • coastalwanderer
    Avatar
    Community Member
    2 Posts

    get_base_tag returns is strange Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: get_base_tag returns is strange Link to this post

    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', ..);

    223 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.