Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Director::setBaseURL() broke ?

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 2008 Views
  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Director::setBaseURL() broke ? Link to this post

    Using 2.2.2rc2

    Everytime I try to set the base-url through Director::setBaseURL ,SS throws an error :

    FATAL ERROR: preg_match() [function.preg-match]: Unknown modifier ']'
    At line 253 in /home/httpd/php/SilvWorldWW/sapphire/core/control/Director.php

    This looks like a reg.ex bug ? If anyone can confirm this behavior I'll create a ticket for it.

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: Director::setBaseURL() broke ? Link to this post

    Is anyone using setbaseURL in 2.2.2RC2 at all?

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: Director::setBaseURL() broke ? Link to this post

    Some more info :

    Silverstripe is running in a subdir/alias... I'm using rewrite rules to make requests go to silverstripe :

    e.g.
    www.mydomain.com/helpme would be rewritten to www.mydomain/silverstripe/helpme ...

    All works great except I can't fool Silverstripe into producing the correct links by itself ; it always produces links to the real location instead of the location I want. That has to do with SS using the wrong Base URL ....

    If I try to manually set my base URL to "/" or "www.mydomain.com" , it throws the error I mentioned in the post above..

    In the site itself I can manually fix this by building links by concatenating a "/" and
    $URLSegment , but the sitemap.xml is all screwed up.

    Any solutions ?

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: Director::setBaseURL() broke ? Link to this post

    Although my problem is a bit different ,this might have something to do with
    http://open.silverstripe.com/ticket/2324 ?

    2008 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.