All pages of my website will be accessible by 2 urls: one is normal english and one - IDN. Example:
www.example.com/examplepage
пример.рф/примерстраницы
On server I just have english files, so I decided to create 2 arrays in php:
$realUrl=array('examplepage');
$fakeUrl=array('примерстраницы');
And check in 404.php file: if user requests url from $fakeUrl array - I just include a page from $realUrl and changes http status code to 200 (NO redirect, so he sees his IDN request in address bar). Is it a good way? Everything works but I am not able to change a response code of such page, I've tried both:
header("HTTP/1.1 200 OK");
http_response_code(200);
but response code is still 404.