Jump to:

4938 Posts in 16827 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Moving from /silverstripe to /root

Getting SilverStripe up and running on your computer and on your web server.

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

Page: 1
Go to End
Author Topic: 2436 Views
  • ewilliams
    Avatar
    Community Member
    12 Posts

    Moving from /silverstripe to /root Link to this post

    We have our very first SilverStripe site, installed and pretty much ready to go live.

    We decided we want everything at the root level in order to make nicer URLs -- mysite.com/contact vs. mysite.com/silverstripe/contact/

    Can we just take the contents of the /silverstripe/ directory and pop them up to root? What files will we need to change? Will it mess up our access to other directories that live at root?

    I couldn't find definite information elsewhere, and all the installation instructions specified using /silverstripe/ as the
    installation directory.

    Thanks in advance.

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: Moving from /silverstripe to /root Link to this post

    Did you end up find an answer to this?

    I am having trouble deploying my site to root, while I have a number of other scripts in folders eg: /forum
    currently I get:

    Website Error
    There has been an error

    The website server has not been able to respond to your request.

    however I have the other scripts working fine.??
    Currently I'm not sure that ss is even connecting to my database (I investigated this issue: http://open.silverstripe.org/ticket/2476 but is does not seem to be the answer since my table names are lowercase on both machines. local and dev)

  • OwenW
    Avatar
    Community Member
    45 Posts

    Re: Moving from /silverstripe to /root Link to this post

    Hi ewilliams,

    The control for how silverstripe is presented is managed via the .htaccess.

    There is a line in the .htaccess that reads;

    RewriteBase /silverstripe

    This means that all requests that make it to main.php will be rewritten as

    http://example.com/silverstripe

    So basically, to be able to have Silverstripe answer on "/" you make the RewriteBase "/".

    If you are sharing the webservers root folder with other things, you may need to put in a line to exclude certain paths from rewriting.

    For example, if you have phpbb installed, you would put a line as follows, to exlude that directory from being included in the main rewrite rules;

    RewriteCond %{REQUEST_URI}!^/phpbb/

    Hope that helps

    Cheers
    Owen

    This line will come before the first RewriteConf in the .htaccess.

  • ewilliams
    Avatar
    Community Member
    12 Posts

    Re: Moving from /silverstripe to /root Link to this post

    We decided to leave it where it is, and just redirect people who arrive at http://www.mysite.com/ to http://www.mysite.com/silverstripe/

    Seemed easier that way.

    Thanks for the advice though.

  • mikek
    Avatar
    Community Member
    1 Post

    Re: Moving from /silverstripe to /root Link to this post

    Hi,

    I 've moved my site to the root folder. The site works fine, just I can't locked me in. If I try it, I redirected to the "Not Found" page.

    Any ideas?

    Mike

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