apache - URL rewrite doesn't work in a Symfony2 -


i have web site under symfony 2 , want have basic url rewrite.

apache mod rewrite enabled. apache has been restarted multiple times.

# a2enmod rewrite module rewrite enabled 

virtual host seems ok

<virtualhost *:80>     servername mydomain.com     serveralias www.mydomain.com      documentroot /home/www/mydomain/web     <directory />         options followsymlinks         allowoverride none     </directory>     <directory /home/www/mydomain/web>         options indexes followsymlinks multiviews         allowoverride none         order allow,deny         allow     </directory>      errorlog ${apache_log_dir}/error.log      # possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     loglevel warn      customlog ${apache_log_dir}/access.log combined </virtualhost> 

and here's .htacess

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

but http://mydomain.com/ gives "index of" page , have pass through http://mydomain.com/app.php/ access web site.

what missing ?!!

you need change allowoverride none allowoverride all

when directive set none , allowoverridelist set none .htaccess files ignored. in case, server not attempt read .htaccess files in filesystem.

when not specified, allowoverridelist set none

http://httpd.apache.org/docs/current/mod/core.html#allowoverride


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -