我将我的symfony2项目复制到共享主机。
我的.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
现在正在加载页面但没有加载资源(js,css文件)。当我尝试打开它们myhost/assets/css/style.css
时收到错误:
ops! An Error Occurred
The server returned a "404 Not Found".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
位于web / assets文件夹中的所有资产
答案 0 :(得分:0)
检查apache配置,或从此doc添加到.htaccess
未注释的最后一行:
# By default, Apache does not evaluate symbolic links if you did not enable this
# feature in your server configuration. Uncomment the following line if you
# install assets as symlinks or if you experience problems related to symlinks
# when compiling LESS/Sass/CoffeScript assets.
# Options FollowSymlinks