php - Symfony2 - New environnement but how to rewrite it url correctly? -
I am creating an application on Symfony2. Everything works fine, I can access it through the web address www.test.ch
For some reasons, I want to create a demo space. So I work with demo.test.ch to create a new vhost.
In Symfony2, I created a new app_demo.php which called a new environnement (espacially loaded the database) for the database. Everything works fine when I call demo.test.ch/app_demo.php but when I want to leave the app_demo.php in the URL (and based on .htaccess in the web directory of Symfony2), url remain demo.test. But is loaded in the environment.
My demo looks virtual:
& lt; VirtualHost *: 80 & gt; ServerAdmin support@test.ch Server Name demo.test.ch DocumentRoot / home / www / test / current / web directoryIndex app_demo.php header set access-control-allow-generation "*" errorlog / home / www / test / share / Log /apache.demo.error.log # Possible values include: Debug, Notification, Notices, Warnings, Errors, Alerts, # Warnings, Rise Loglevel Warning Custom Lodge / home / www./test/shared/logs/apache .demo.access.log combined & lt; / VirtualHost & gt; I think I miss something about rewriting my vhost settings, but what can I not find is anyone have some tips for me?
Thanks a lot!
Open .htaccess in / home / www / test / Current / web You need to change app.php Front controller ( app_demo.php ) < / P>
Comments
Post a Comment