Bonjour,
J'ai consulté la documentation Symfony et j'ai lu ça (Chapitre 3, page
42-43, Setting Up a Virtual Host):
Note The alias to the web/sf/ directory is not mandatory. It allows
Apache to find images, style sheets,
and JavaScript files for the web debug toolbar, the admin generator,
the default symfony pages, and the Ajax
support. An alternative to this alias would be to create a symbolic
link (symlink) or copy the /path/to/
symfony/data/web/sf/ directory to myproject/web/sf/.
et aussi ça:
Symfony uses URL rewriting to display “smart URLs”—meaningful
locations that display well on search engines
and hide all the technical data from the user. You will learn more
about this feature, called routing, in Chapter 9.
If your version of Apache is not compiled with the mod_rewrite module,
check that you have the
mod_rewrite Dynamic Shared Object (DSO) installed and the following
lines in your httpd.conf:
AddModule mod_rewrite.c
LoadModule rewrite_module modules/mod_rewrite.so
J'ai donc pensé que mes problèmes ("perte" dans l'arbo. en mode prod,
et plugin LightBox qui ne fonctionne pas, décrit ici
http://groups.google.com/group/symfony-fr/browse_thread/thread/663ecf4f29b648c/8f24df15c5d4f479?hl=fr&lnk=gst&q=Lightbox#8f24df15c5d4f479)
venait peut être de ma config d'Apache.
Ne sachant pas faire de lien symbolique, j'ai copié le rép. <C:\wamp
\php\PEAR\data\symfony\web\sf> dans <C:\wamp\www\lioneltagneres\web>
J'ai essayé de rajouter les lignes suivantes dans mon httpd.conf:
AddModule mod_rewrite.c
LoadModule rewrite_module modules/mod_rewrite.so
Mais Apache refuse de se lancer si je ne les commente pas.
###############################################################################################
Je vous poste donc mon httpd.conf actuel (du moins ce que j'ai ajouté
au fichier de base):
###############################################################################################
Include "c:/wamp/apache2/conf/alias/phpmyadmin.conf"
Include "c:/wamp/apache2/conf/alias/sqlitemanager.conf"
<VirtualHost *:80>
ServerName lioneltagneres
DocumentRoot "C:\wamp\www\lioneltagneres\web"
DirectoryIndex index.php
Alias /sf C:\wamp\php\PEAR\data\symfony\web\sf
<Directory "C:\wamp\php\PEAR\data\symfony\web\sf">
AllowOverride All
Allow from All
</Directory>
<Directory "C:\wamp\www\lioneltagneres\web">
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
# ajout lio
# AddModule mod_rewrite.c
# LoadModule rewrite_module modules/mod_rewrite.so
###############################################################################################
Et mon .htaccess, auquel je n'ai pas touché
###############################################################################################
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /
# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
# big crash from our front web controller
ErrorDocument 500 "<h2>Application error</h2>symfony application
failed to start properly"
################################################################################################
Je vous remercie beaucoup de votre patience,
EM.