Php symfony 1.0:错误->&引用;页面不是';t正确地重定向“;

Php symfony 1.0:错误->&引用;页面不是';t正确地重定向“;,php,symfony1,Php,Symfony1,我正在学习symfony 1.0,我一直面临一个问题,页面没有正确重定向 我一路努力,但每次都失败了。是因为setAuthentication()还是session() 更新:.htaccess文件: Options +FollowSymLinks +ExecCGI #rewritecond %{http_host} ^www.imaginamalta.com/New/ [nc] #rewriterule ^(.*)$ https://www.imaginamalta.com/New/$1

我正在学习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"
Options+FollowSymLinks+ExecCGI
#重写cond%{http_host}^www.imaginamalta.com/New/[nc]
#重写规则^(.*)$https://www.imaginamalta.com/New/$1[r=301,L]
重新启动发动机
#如果遇到问题,请取消对以下行的注释
#无法使用脚本名称
#重写基/
#我们跳过了所有的文件
#注释以下3行,以允许在管线中使用句点
重写条件%{REQUEST_URI}\+$
重写条件%{REQUEST\u URI}!\。html$
重写规则。*-[L]
#我们检查.html版本是否在这里(缓存)
重写规则^$index.html[QSA]
重写规则^([^.]+)$$1.html[QSA]
重写cond%{REQUEST_FILENAME}-F
#不,所以我们重定向到前端web控制器
重写规则^(.*)$index.php[QSA,L]
重写cond%{http_host}^http://meh.newsly.svs113/ [北卡罗来纳州]
重写规则^(.*)$http://meh.newsly.svs113/$1[r=301,L]
#我们的前端网络控制器发生大崩溃
ErrorDocument 500“应用程序错误SYMFONY应用程序无法正确启动”

听起来您的
.htaccess
有问题。尝试将
AllowOverride
设置为
ALL

您真的不应该从Symfony 1.0开始。至少使用1.4(支持将在11月结束)或使用Symfony2.Thanx来回复richsage,但我有一个由某人开发的symfony 1.0网站,我必须尽早解决此问题。您需要向我们展示其他东西。与错误的stacktrace、action类中的相关方法等类似,我通过在登录时保存会话attrinue来验证用户,并使用menu.php部分中的$sf_user->isAuthenticated()方法来验证用户是否经过身份验证。当我在未注销的情况下关闭浏览器并返回时,会发生此错误。请向我们显示执行身份验证的代码,以及您遇到的全部错误,等等。你在这里谈论的是SymPHony,线程与symFony:)有关。htaccess文件是默认设置的,我认为问题出在其他地方。j0k:你能给我一些解释吗?因为我不明白你的意思。Thariama:我刚刚编辑了我的问题,并对htaccess文件提出了质疑。如果你清除了你的cookie怎么办?有可能在线测试吗?