Hello,
I am using the following .htaccess file to allow access to subsequent areas of my web site only from within the domain itself, ie I want to prevent direct access to the file by typing the file location directly into the browser address bar.
#
# Make sure that this directory can only be accessed by other programs on this domain
#
SetEnvIfNoCase Referer mydomain.co.uk internal
#SetEnvIfNoCase origin mydomain.co.uk internal
#
order Deny,allow
Deny from all
allow from env=internal
Now this works perfectly when using Firefox or Chrome, but does not work with Internet Explorer 8.
The first page which is not in the protected directory loads OK, but an embeded mp3, the source of which is in a protected directory does not play - it is coded as follows
<embed src="ProtectedDir/sounds/Welcome.mp3" autostart="true" width="1" height="1" hidden="false"></embed>.
I could move the file into the starting directory, but there is another problem.
When a button to continue is clicked
<input type="button" value="Continue" onClick="top.location='ProtectedDir/ProtectedFile.php'" />
to move to the next page in a protected directory, I get the following message.
Forbidden
You don't have permission to access /MyDir/ProtectedDir/ProtectedFile.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This of course is the message you will get if you type the address directly into the browser address bar, which is what does happen.
As I mentioned, everything works OK in Firefox and Chrome - they both stop direct access but allow access using the Continue button, but IE8 fails to work.
I can only assume that there is some setting within IE8 that is preventing this working. Can anyone offer any advice on this and suggest a cure ?
Thanks in advance,
Nick.