我需要将任何url重定向到index.php,因为它现在是除了worker.php文件
目录:
service/public/index.php
service/public/.htaccess
service/worker.php
我的.htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
答案 0 :(得分:1)
只有在index.php
不在请求的文件中时,您才可以添加额外的重写条件,以便应用worker.php
重写规则
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !worker\.php$
RewriteRule ^ index.php [QSA,L]