【发布时间】:2013-08-13 19:58:54
【问题描述】:
考虑以下网址:
http://dns/ePhotograph/web/app.php/home
我想使用 URL 重写,以便可以从以下 URL 访问它:
http://dns/home
我怎样才能用 apache 做到这一点?
编辑
这是我的虚拟主机文件:
<VirtualHost 88.191.157.10:80>
ServerName myurl.fr
ServerAlias www.myurl.fr
ServerAdmin email@gmail.com
DocumentRoot /var/www/ePhotograph/web
DirectoryIndex app.php
<Directory "/var/www/ePhotograph/web">
AllowOverride All
Allow from All
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
【问题讨论】: