I recently decided to add an Easter egg to my website, to do this I used a script that works as a konami code, but it doesn’t seem to work, when I run the code it is redirected to another php, and the happy error 404 page not found appears, which peculiar is that when accessing from the url knowing the file path it can be accessed, but using the konami code it does not work, just as if I run it on a local server it does work, I have already reviewed the code several times but there do not appear to be any errors , and I’m already out of ideas
I think the “solution”
To achieve this I changed the type of route, I decided it was better to put it as a direct url instead of reading the files and with that it is redirected as desired, the problem is that I don’t know how the other thing happened since outside of infinity free it works as it should Now I just have one more question.
How can I change the url, so that it does not show the file path?
Since the URL is your Easter Egg and you are not willing to reveal it at this time, can you at least say your framework choice (as you mentioned route - Laravel?) and how you intend to have it work.
So you’re considering PHP file_get_contents() or readfile() performance I see.
In this case you can either edit the .htaccess if you do not use a framework.
Or, you have to adjust the routing scheme to give it a redirect instead.
Actually readfile() or not, it’s still gonna count against a hit to your server, and there isn’t that much of a performance impact to be honest (as you’re doing reading only).
Well, in the end, because of what the Easter egg contains, I would prefer not to share it as such, but I already found a solution, at least temporary, and if errors occur I will see how to solve it, thanks anyway.
As far as I have seen, in this case it should not present a problem, but I think I already know what the error was, but for the moment I will leave it with the solution that I was able to find yesterday, thanks anyway
Well, you’re right that I don’t want to share that Easter egg because it contains something that I would only like to reveal to one person at some point hahaha.
The truth is I still don’t understand much about terminology, because my language is Spanish, and I have only learned what is necessary to create this page for a competition, but I don’t know about terms and things like that, thanks anyway, I will investigate about that later.