Bonjour
j'utilise symfony2 en local avec un serveur apache sur linux.
je peux accéder à ma page avec ces 2 urls :
http://helloworld/symfony/web/app_de...eteo2/bordeaux
http://helloworld/symfony/web/meteo2/bordeaux
sauf que je voudrais pouvoir y accéder directement à cette adresse :
http://helloworld/meteo2/bordeaux
et ça ne fonctionne pas (404 not found)
le mod_rewrite est bien activé.
mon vhost :
<VirtualHost *:80>
ServerName helloworld
DocumentRoot /home/port-radhius6/Documents/helloworld/symfony/web/
</VirtualHost>
app/config/routing.yml
SiteMeteoBundle:
resource: "@SiteMeteoBundle/Resources/config/routing.yml"
prefix: /
MeteoBundle/Ressources/config/routing.yml
SiteMeteoBundle_afficherMeteo:
pattern: /meteo2/{ville}
defaults: { _controller: SiteMeteoBundle:Meteo:afficherMeteo }
le .htaccess dans web/ :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /symfony/web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app_dev.php [QSA,L]
</IfModule>
j'ai essayé plusieurs rewriteBase et rewriteCond mais ça ne marche toujours pas.
Merci pour vos réponses =)
Partager