21285 Posts in 5732 Topics by 2602 members
General Questions
SilverStripe Forums » General Questions » CSS not loading after moving silverstripe installation
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 1636 Views |
-
CSS not loading after moving silverstripe installation

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/silverstripeHow do i fix this?
-
Re: CSS not loading after moving silverstripe installation

13 September 2009 at 9:55am
check the .htaccess file in /var/www/. The silverstripe path could have been hardcoded into that.
-
Re: CSS not loading after moving silverstripe installation

13 September 2009 at 11:28pm
Sadly, there is no .htaccess file in /var/www....
Now what? -
Re: CSS not loading after moving silverstripe installation

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! -
Re: CSS not loading after moving silverstripe installation

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? -
Re: CSS not loading after moving silverstripe installation

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...
-
Re: CSS not loading after moving silverstripe installation

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 ? -
Re: CSS not loading after moving silverstripe installation

15 September 2009 at 3:11am
Just tried both, nothing works.
Now what?
Do you need any additional info?
| 1636 Views | ||
| Go to Top | Next > |



