As part of an anti-leeching scheme I'm working on, I'm trying to pass basic authentication credentials (for an .htaccess protected directory) on PHP redirect like follows:
Code: Select all
Header ("Location: http://username:password@www.domain.com/files_prot/file.txt");It's not working, however. PHP (or Apache?) seems to be ignoring the credentials. When my browser is redirected, I'm presented with the authentication box. I've heard this works fine with an ASP redirect.
Does anyone have any ideas on how to get this to work?
Best Regards,
Auto