0
我在Symfony 2下有一个网站,并且想要进行基本的URL重写。URL重写在Symfony2中不起作用
启用Apache mod重写。 Apache已经多次重启。
# a2enmod rewrite
Module rewrite already enabled
虚拟主机似乎确定
<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 from all
</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>
这是我的.htacess
<IfModule mod_rewrite.c>
RewriteEngine On
#<IfModule mod_vhost_alias.c>
# RewriteBase/
#</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
但http://mydomain.com/给在网页“指数”,我必须通过http://mydomain.com/app.php/来访问我的网站现场。
我错过了什么?
这就是它!非常感谢 ! – moins52 2013-05-14 18:32:54