Symfony 3/4/9路由不工作。我已经使用cmd创建了控制器(php-bin/console-make:controller)
路由不适用于新控制器。我已经创建了新的控制器。检查以下屏幕截图Symfony 3/4/9路由不工作。我已经使用cmd创建了控制器(php-bin/console-make:controller),symfony,Symfony,路由不适用于新控制器。我已经创建了新的控制器。检查以下屏幕截图 当我绑定以下url时。然后什么也没有出来 花了一整天的时间后,我发现.htaccess中出现了问题。如果有人面临相同的问题,请检查htaccess是否存在相同的问题 重新启动发动机 # Determine the RewriteBase automatically and set it as environment variable. RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
当我绑定以下url时。然后什么也没有出来 花了一整天的时间后,我发现.htaccess中出现了问题。如果有人面临相同的问题,请检查htaccess是否存在相同的问题 重新启动发动机
# Determine the RewriteBase automatically and set it as environment variable.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
# If the requested filename exists, simply serve it.
# We only want to let Apache serve files and not directories.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/index.php [L]
我正在使用Symfony 3.4.9版