I succeeded in install my application on a shared server with this tutorial. My problem is the level of assets. In my template I use my CSS like this:
{% stylesheets '@FrontHomeBundle/Resources/public/css/style.css'
'@FrontHomeBundle/Resources/public/css/960.css' combine=true filter='?yui_css' output='css/comingSoon.css' %}
<link rel="stylesheet" type="text/css" media="screen" href="{{ asset_url }}"/>
{% endstylesheets %}
same for the JS:
{% javascripts 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'
'@FrontHomeBundle/Resources/public/js/cufon-yui.js'
'@FrontHomeBundle/Resources/public/js/Adobe_Caslon_Pro_600.font.js' filter='?yui_js' combine=true output='js/comingSoon.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
On my local server it works perfectly, but on my shared server I do not have access to the CSS and JS or images that are in the directory 'web / images /'.
I guess that is a .htaccess problem but I do not know what.
I put the config for assetics:
# Assetic Configuration
assetic:
debug: %kernel.debug%
use_controller: false
# java: /usr/bin/java
read_from: %kernel.root_dir%/../web
write_to: %kernel.root_dir%/../web/cache
filters:
cssrewrite: ~
# closure:
# jar: %kernel.root_dir%/java/compiler.jar
yui_js:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
yui_css:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
The .htaccess at the root of the project:
SetEnv SHORT_OPEN_TAGS 0
SetEnv REGISTER_GLOBALS 0
SetEnv MAGIC_QUOTES 0
SetEnv SESSION_AUTOSTART 0
SetEnv ZEND_OPTIMIZER 1
SetEnv PHP_VER 5_3
AddType x-mapp-php5 .php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ web/app.php [QSA,L]
</IfModule>
The .htaccess in the web directory:
SetEnv SHORT_OPEN_TAGS 0
SetEnv REGISTER_GLOBALS 0
SetEnv MAGIC_QUOTES 0
SetEnv SESSION_AUTOSTART 0
SetEnv ZEND_OPTIMIZER 1
SetEnv PHP_VER 5_3
AddType x-mapp-php5 .php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
Do you have a track to solve the problem? You on a shared server how do you to display images and CSS?
Thank you very much for your help