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.

Archive /

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

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

Director::setBaseURL() broke ?


Reply


4 Posts   2070 Views

Avatar
Fuzz10

Community Member, 787 Posts

7 April 2008 at 8:13pm

Edited: 07/04/2008 8:33pm

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.

Avatar
Fuzz10

Community Member, 787 Posts

9 April 2008 at 2:28am

Is anyone using setbaseURL in 2.2.2RC2 at all?

Avatar
Fuzz10

Community Member, 787 Posts

11 April 2008 at 3:56am

Edited: 11/04/2008 3:58am

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 ?

Avatar
Fuzz10

Community Member, 787 Posts

12 April 2008 at 1:46am

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