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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

CSS not loading after moving silverstripe installation


Go to End


11 Posts   4381 Views

Avatar
ssduduk

Community Member, 8 Posts

13 September 2009 at 4:19am

I did a bad thing.
I installed silverstripe in /var/www/silverstripe and it worked great.
But then i moved the installation in /var/www
That's when css files stopped loading.

This is what the error log says:
File does not exist: /var/www/silverstripe

How do i fix this?

Avatar
Willr

Forum Moderator, 5523 Posts

13 September 2009 at 9:55am

check the .htaccess file in /var/www/. The silverstripe path could have been hardcoded into that.

Avatar
ssduduk

Community Member, 8 Posts

13 September 2009 at 11:28pm

Sadly, there is no .htaccess file in /var/www....
Now what?

Avatar
bummzack

Community Member, 904 Posts

13 September 2009 at 11:55pm

The .htaccess file should be there or it's still in /var/www/silverstripe and you didn't move it. There's usually a .htaccess file involved with a SilverStripe site...
On *nix systems, files that start with a dot (.) are usually hidden. Make sure that these hidden files are also shown to you!

Avatar
ssduduk

Community Member, 8 Posts

14 September 2009 at 8:34pm

I know how to see hidden files, i even did a find, and it found a few, but not in /var/www (there were some in the subfolders though).
I am guessing that when i did the move, it did not move the hidden files.
I deleted the silverstripe subfolder though.
What is the next step, do i reinstall?

Avatar
bummzack

Community Member, 904 Posts

14 September 2009 at 9:57pm

Just create a new .htaccess file and put in the following code

### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

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

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

Make sure to change the RewriteBase if needed...

Avatar
ssduduk

Community Member, 8 Posts

15 September 2009 at 3:02am

I created the file, but no change. Can you elaborate what should stand in RewriteBase?
Since silverstripe is sitting in /var/www which is the root folder it should remain / as it is?
Or am i mistaken, and should put /var/www ?

Avatar
ssduduk

Community Member, 8 Posts

15 September 2009 at 3:11am

Just tried both, nothing works.
Now what?
Do you need any additional info?

Go to Top