Hello everyone!
I am setting up a system where I have a directory of renders (pre-cut images for graphics) and I do not want them accessible to anyone who is not a member of the premium usergroup on my vBulletin forum. I used a htaccess script of "Order Allow, Deny" to make the directory completely unaccessible. I'm sure my error lies in here, but I'm not sure.
I used the following code on the page that will allow the user to download the files from:
Code:
<?php
if ($vbulletin->userinfo['usergroupid'] == '6' )
{
echo "Welcome to the premium section!<br /><a href='depu/Avatars.rar'>A</a>";
} else {
echo "You do not have permission for this page"; }
?>
When I go to right click and save as for the file, it just brings up a 404 error page. When I click on the file with a left click, it brings up the Internal Server Error page. My .htaccess file for the directory the Avatars.rar file is in says:
Order allow, deny
I set the htaccess up to make it so if someone outside of the usergroup finds out the file name in the directory (ie Avatars.rar), they can't just go to mysite.com/depu/Avatars.rar and download it. Should I have a different command in the htaccess file? Or does the php code have to include something else?
And when I load that page in my main page using a php include, it doesn't let me download the rar file. Do I have to include some type of php code inside of the htacces? Or did I mess up my coding?