dongliuliu0385 2015-10-03 08:29
浏览 59

删除/更改特定CSS部件后,会发生ERR_TOO_MANY_REDIRECTS

A few days back I added a overlaying gradient effect to one of my pages. I wrote it directly between two <style> tags for testing into my index.php. Now I wanted to copy it into my .css file but whenever I delete or change the following part from my file the site is not accessible anymore because of an ERR_TOO_MANY_REDIRECTS error.

This ist the part causing the problem (notice: the css works find. I can't delete it anymore from the source file without causing errors):

gradient {
  position:absolute;
  z-index:2;
  right:17px; bottom:25px; left:17px;
  height:125px; /* adjust it to your needs */
  background: url(data:image/svg+xml;base64,alotofcodehere);
  background: -moz-linear-gradient(top,  rgba(255,255,255,0) 0%, rgba(255,255,255,1) 70%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(70%,rgba(255,255,255,1)));
  background: -webkit-linear-gradient(top,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 70%);
  background: -o-linear-gradient(top,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 70%);
  background: -ms-linear-gradient(top,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 70%);
  background: linear-gradient(to bottom,  rgba(255,255,255,0) 0%,rgba(255,255,255,1) 80%);
}​

What I've done so far:

  • deleted every browser data, even manually for several times now
  • allowed third party cookies
  • private mode
  • read a lot of different threads about the error
  • restarted my PC, apache, nearly everything

But nothing works and now I'm very suspicious what causes this weird problem. I tried to access the site from another machine with Chrome and Edge. Same issue. When I copy back the CSS part shown above, everything works fine. The console shows the following:

enter image description here

Could there be a -maybe- caching problem with apache? I'm very confused at the moment. Never though a CSS definition can affect a site in that way.

Does anyone have any idea or keywords for me? Thank you in advance!

EDIT:

enter image description here

UPDATE: I've made my code not using sessions and cookies anymore but this didn't do the trick. It's the CSS part that still causes the problem whereas I have no idea how.

UPDATE: The header(...) caused the problem. I have to write it inside the curly brackets:

if(isset($_POST['RequestType']) && isset($_POST['OperatingSystem'])  ) {
    saveRequest();
} else if(isset($_POST['RequestToDelete'])) {
    deleteRequest();
} else if(isset($_POST['Login'])) {
    login();
}
header("Location: index.php");
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?