Ver Mensaje Individual
  #18 (permalink)  
Antiguo 08/05/2015, 17:08
nelson_nnn
 
Fecha de Ingreso: octubre-2013
Mensajes: 35
Antigüedad: 11 años, 1 mes
Puntos: 0
Respuesta: Puesta en Producción proyecto Symfony2

Yo he subido a un hosting compartido sin problemas, subí el directorio web a la carpeta public, antes de subir todo el proyecto eliminé las caché totalmente, luego de subir el proyecto fui a app.php y cambie el modo produccion true $kernel = new AppKernel('prod', true); y en el app_dev.php lo contrario lo puse como false y funcionó sin problemas, también procura que el htacces este correcto apuntando a esas clases
Código HTML:
Ver original
  1. <IfModule mod_rewrite.c>
  2.     RewriteEngine On
  3.  
  4.     # Determine the RewriteBase automatically and set it as environment variable.
  5.     # If you are using Apache aliases to do mass virtual hosting or installed the
  6.     # project in a subdirectory, the base path will be prepended to allow proper
  7.     # resolution of the app.php file and to redirect to the correct URI. It will
  8.     # work in environments without path prefix as well, providing a safe, one-size
  9.     # fits all solution. But as you do not need it in this case, you can comment
  10.     # the following 2 lines to eliminate the overhead.
  11.     RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
  12.     RewriteRule ^(.*) - [E=BASE:%1]
  13.  
  14.     # Redirect to URI without front controller to prevent duplicate content
  15.     # (with and without `/app.php`). Only do this redirect on the initial
  16.     # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
  17.     # endless redirect loop (request -> rewrite to front controller ->
  18.     # redirect -> request -> ...).
  19.     # So in case you get a "too many redirects" error or you always get redirected
  20.     # to the start page because your Apache does not expose the REDIRECT_STATUS
  21.     # environment variable, you have 2 choices:
  22.     # - disable this feature by commenting the following 2 lines or
  23.     # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
  24.     #   following RewriteCond (best solution)
  25.     RewriteCond %{ENV:REDIRECT_STATUS} ^$
  26.     RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
  27.  
  28.     # If the requested filename exists, simply serve it.
  29.     # We only want to let Apache serve files and not directories.
  30.     RewriteCond %{REQUEST_FILENAME} -f
  31.     RewriteRule .? - [L]
  32.  
  33.     RewriteRule .? %{ENV:BASE}/app.php [L]
  34. </IfModule>