Jump to:

4945 Posts in 17872 Topics by 1494 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » No home when installed to subdirectory

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: 1770 Views
  • paulkoan
    Avatar
    Community Member
    5 Posts

    No home when installed to subdirectory Link to this post

    Hello,

    I have seen some of the caching issues before related to some installs, but this seems a bit different. I have installed silverstripe 2.2.3 to

    http://hostname/silver

    (note that hostname is internal, and so not fqdn)

    The about-us and contact-us page works fine, and if I go to http://hostname/silver/home, the url is rewritten as http://hostname/silver and the home page is presented.

    However, if I go to http://hostname/silver directly, I get an index listing of the site. I have tried this with multiple browsers and clearing cache and I get the same result.

    My .htaccess is:

    ### SILVERSTRIPE START ###
    <IfModule mod_dir.c>
    DirectorySlash Off
    </IfModule>

    RewriteEngine On
    RewriteBase /silver

    RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    In the behaviour tab of the home page, I have tried a whole bunch of things to see if the behaviour is the issue:

    hostname, hostname/silver, http://hostname/silver, hostname.domain.local/silver

    Once I get to the site via the redirect, the index list no longer comes up.

    Any ideas?

  • paulkoan
    Avatar
    Community Member
    5 Posts

    Re: No home when installed to subdirectory Link to this post

    Hmm. I haven't managed to reproduce this since I posted, so I imagine this was a caching problem...

  • w1
    Avatar
    Community Member
    21 Posts

    Re: No home when installed to subdirectory Link to this post

    I think you should find it will work using http://hostname/silver/ - add a trailing slash

    hope that helps

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