Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Changing the Base URL

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: 2061 Views
  • sammahoney
    Avatar
    Community Member
    14 Posts

    Changing the Base URL Link to this post

    Hi All

    I've just finished making a site for a client using SS. I've had to do a few work-arounds for problems I couldn't get answers for. The last thing I'm trying to do is to change the URL that shows when you hover on a link.

    At the moment it says

    http://host.qsoftdns.net/~username/about-us/

    The actual domain name redirects to http://host.qsoftdns.net/~username/

    But I'd like it to be masked. I tried adding this to the _config file

    Director::setBaseURL("http://www.domainname.com/");

    However, when I do this I can still view the site, but it's not able to get the .css file for some reason so all the styling is lost. Also the pictures on the pages don't show. But if I view the source of the pictures, copy the URL, then open it on it's own, I can see it.

    For example, http://www.domainname.com/assets/Uploads/intropic.jpg shows up ok.

    Why can't SS find the files anymore?

  • sammahoney
    Avatar
    Community Member
    14 Posts

    Re: Changing the Base URL Link to this post

    Anyone? Surely this must've come up before no?

  • spenniec
    Avatar
    Community Member
    37 Posts

    Re: Changing the Base URL Link to this post

    Hi Sam,
    To clarify, when you put http://www.domainname.com/ in a browser it successfully redirects (this is the web server not SS) to http://host.qsoftdns.net/~username/
    Taking SS out of the equation if there is a index.html file in here it displays it, right?

  • sammahoney
    Avatar
    Community Member
    14 Posts

    Re: Changing the Base URL Link to this post

    Yeah, but the weird thing is it displays my SS site, I can see all the content, and the menu works, but it won't read the CSS file or display the images, so it's showing an unstyled version of my site...but if I do a direct path to an image or the CSS file in a separate window, using the new forwarded version of the address, I can view them no problem?!?

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