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.

Installing SilverStripe /

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

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

No home when installed to subdirectory


Reply


3 Posts   1861 Views

Avatar
paulkoan

Community Member, 5 Posts

5 February 2009 at 11:15pm

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?

Avatar
paulkoan

Community Member, 5 Posts

6 February 2009 at 3:19am

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

Avatar
w1

Community Member, 21 Posts

13 February 2009 at 10:19am

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

hope that helps