【发布时间】:2017-11-16 18:44:51
【问题描述】:
您好,我正在使用 Symfony (Swiftmailer) 发送电子邮件,我遇到的问题是:
加载 Web 调试工具栏时出错(404:未找到) 是否要打开分析器?
电子邮件已成功发送,但问题是我无法呈现任何 *.html.twig。
我尝试了 != 命令 php bin/console debug:event-dispatcher 和 .htacces 之类的解决方案
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /app.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
# When mod_rewrite is not available, we instruct a temporary redirect of
# the start page to the front controller explicitly so that the website
# and the generated links can still be used.
RedirectMatch 302 ^/$ /app.php/
# RedirectTemp cannot be used instead
</IfModule>
</IfModule>
但是网上提出的所有解决方案都对我不起作用,感谢您的帮助。
【问题讨论】:
-
检查防火墙和路由以获取调试工具栏。只有 Swiftmailer 有问题吗?
-
是的,只有 swiftmailer 才有问题
-
当我查看 config_dev.yml 时,我发现以下代码:web_profiler: toolbar: false intercept_redirects: false
-
正在使用哪个版本的 symfony?
标签: php apache .htaccess symfony swiftmailer