Configure .htaccess to work on a PHP Framework (Silex)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a working path on my Apache2 localhost (linux): http://localhost/lab/silex/web/index.php/hello/name I want to become: http://localhost/lab/silex/hello/name Now I have Rewrite mode enabled and tested. I have placed my .htaccess file in my silex/web folder: <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase /web/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [L] </IfModule> I still cannot see the clean url working. 回答1: in your main folder try this: (for you this