apache - Symfony2 : redirect localhost/app_dev.php to localhost/ -



apache - Symfony2 : redirect localhost/app_dev.php to localhost/ -

i developping website/web-app locally, includes many ajax calls etc... problem everytime have include app_dev.php url - when go on prod i'll need search , replace these urls..

is there way via apache hide app_dev.php ? read many questions on 1 no solution worked me.

what did adding this:

<virtualhost *:80> serveradmin webmaster@dummy-host.example.com documentroot "c:/wamp/www/web" directoryindex app_dev.php servername dummy-host.example.com serveralias localhost errorlog "logs/dummy-host.example.com-error.log" customlog "logs/dummy-host.example.com-access.log" mutual <directory "c:/wamp/www/web"> allowoverride allow </directory> </virtualhost>

to httpd.conf ignored...

i working wamp 2.2

i changed web/.htaccess following, :

<ifmodule mod_rewrite.c> options +followsymlinks rewriteengine on #<ifmodule mod_vhost_alias.c> # rewritebase / #</ifmodule> rewritecond %{request_filename} !-f rewriterule ^(.*)$ app_dev.php [qsa,l] </ifmodule>

i added next httpd.conf:

documentroot "c:/wamp/www/web" <directory "c:/wamp/www/web">

and httpd-vhosts.conf (c:\wamp\bin\apache\apache2.4.2\conf\extra) :

<virtualhost *:80> serveradmin webmaster@dummy-host.example.com documentroot "c:/wamp/www/web" directoryindex app_dev.php servername localhost serveralias localhost errorlog "logs/dummy-host.example.com-error.log" customlog "logs/dummy-host.example.com-access.log" mutual <directory "c:/wamp/www/web"> allowoverride allow </directory> </virtualhost>

apache mod-rewrite symfony2

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -