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:
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:
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");