我正在学习 symfony 1.0,但我一直面临页面未正确重定向的问题
我尝试了所有方法,但每次尝试都失败了。是因为 setAuthentication() 还是 session() ?
更新:.htaccess
文件:
Options +FollowSymLinks +ExecCGI
#rewritecond %{http_host} ^www.imaginamalta.com/New/ [nc]
#rewriterule ^(.*)$ https://www.imaginamalta.com/New/$1 [r=301,L]
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /
# we skip all files with .something
# comment the following 3 lines to allow periods in routes
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
rewritecond %{http_host} ^http://meh.newsly.svs113/ [nc]
rewriterule ^(.*)$ http://meh.newsly.svs113/$1 [r=301,L]
</IfModule>
# big crash from our front web controller
ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly"