Silex“你好世界” - 404

I have LAMP on fedora 21, install silex, created a virtualhost. It is config:

<VirtualHost *:80>
ServerName film.dev
DocumentRoot /var/www/html/video/web/
</VirtualHost>

In the /web directory I create .htaccess with content:

<IfModule mod_rewrite.c>
Options-MultiViews

RewriteEngine On
RewriteBase /video/web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

On page http://film.dev/hello, I got a 404.

In file web/index.php I changed: "$app->get('/hello'," to "$app->get('/'," It's work.

Tell me, how can I solve the problem with the redirect?

Replace

<IfModule mod_rewrite.c>
    Options-MultiViews

    RewriteEngine On
    RewriteBase /video/web
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

With

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /video/web
    RewriteCond $1 !^(index\.php|robots\.txt)
    RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

Hope it will be useful for you.

Try to modify your vhost configuration info below .

<VirtualHost *:80>
ServerName film.dev
DocumentRoot /var/www/html/video/web
<Directory "/var/www/html/video/web">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All 
    Order deny,allow
    Allow from all 
</Directory>

Hope this can help you!