PHP: 403 fire or 404 error?

hi guys quick but strange question. Is it possible to show the power of 403 or 404 errors. I have a kind of admin page where I am trying to infiltrate hackers from my file system on my server. (the path is delivered to the URL, and you could just pass ../ to it and get into my philology - I know that this is not good to do). Anyway, if someone is trying to enter ../ in my url, I currently just use the stamp ('forbidden') to make sure that this area is not allowed on my server.

I was wondering now if it is really possible for a fire to become a real forbidden 403 error? I defined page 403 in my .htaccess document, which appears if it's real 403. Is it possible that the fire was 403, so .htaccess refers to page 403. I mean, I could easily specify it hard and just link to error page 403. I just wondered if this is possible?

thanks for your reply.

+3
source share
2 answers

Just release

header("HTTP/1.0 403 Forbidden");

before any other exit.

Also make sure you double up and test your sanitizer three times on the way.

+11
source

This will send 404 as well as your 404 page:

<?php 
header("HTTP/1.0 404 Not Found"); 
include("/var/www/html/site.domain.com/err/404.php"); 
?> 

Source: http://www.webmasterworld.com/forum88/784.htm (from Google)

+6
source

Source: https://habr.com/ru/post/1757255/


All Articles