This effect is accomplished by sending an additional header. You can use PHP, for example, to achieve this:
URLs can be rewritten using .htaccess, (internally) redirecting the request to a PHP file. I will show a simple hard-coded example, of how the header can be set: