John Smith Posted August 25, 2015 Share Posted August 25, 2015 hey guys umm so i got my site, and i can upload files like for example in folder test and put image test1.png in the folder and then i can access the image by typing in my browser mysite.com/test/test1.png and the image will be shown but i have a question: how can i restrict the file so that people can't use browser links to locate the file, but that fetchRemote can still download the image? is there a way? i just want that only my server can access some of my files on my websites i dont want somebody to discover my secret files and then simply download them (e.g images) Link to comment
KariiiM Posted August 25, 2015 Share Posted August 25, 2015 You mean,you want only the server players who can be able to download the images..etc from the website? Link to comment
John Smith Posted August 25, 2015 Author Share Posted August 25, 2015 Yeah.. some programs/sites store their secret data like images or something on their private server though even if you had the path to that secret data, on browser it would simply deny the access or wouldn't load at all so i want that i can access files with fetchRemote, but accessing the file with browser should be blocked and idk how to rly do that Link to comment
KariiiM Posted August 25, 2015 Share Posted August 25, 2015 Im not sure if people in this section can helps you, since it's out of MTA scripting, i suggest you to watch some tutorials in youtube or talk to someone in mta as a web developer maybe he know how to handle it Link to comment
t3wz Posted August 25, 2015 Share Posted August 25, 2015 Just edit your .htaccess to allow only one ip order deny,allow deny from all allow from 1.2.3.4 where is 1.2.3.4 you put the server ip. Link to comment
John Smith Posted August 25, 2015 Author Share Posted August 25, 2015 Just edit your .htaccess to allow only one ip order deny,allow deny from all allow from 1.2.3.4 where is 1.2.3.4 you put the server ip. I didn't originally have .htaccess file, so i created it and i put this, but i can still access anything with my browser is there any other way to do this?i don't know why doesn't this work.. Link to comment
t3wz Posted August 25, 2015 Share Posted August 25, 2015 I didn't originally have .htaccess file, so i created it and i put this, but i can still access anything with my browseris there any other way to do this?i don't know why doesn't this work.. are you sure you typed the correct name (.htaccess) and your webserver is Apache? Link to comment
John Smith Posted August 25, 2015 Author Share Posted August 25, 2015 I didn't originally have .htaccess file, so i created it and i put this, but i can still access anything with my browseris there any other way to do this?i don't know why doesn't this work.. are you sure you typed the correct name (.htaccess) and your webserver is Apache? Yes. I don't know whether this could cause the issue, but let me explain how is my website setup I got my own domain, i pointed the domain towards my vps ip (so e.g mydomain.com redirects you to vps ip) on vps(debian 8 ) i have folder /var/www/html in html folder i place anything related to the site (e.g index.html file which loads when you visit e.g mydomain.com) however originally there hasn't been that .htaccess file, so i created it and used your lines of (code?) I don't really know why doesn't this work. I got apache service installed on my vps But the VPS shouldn't be the problem, many websites run on a vps or a dedicated server this forum might be the completely wrong place to ask this kind of questions, but i thought that there might be someone who knows this things, if anyone knows how i could solve this or where i can ask for help regarding this, please tell me Link to comment
Walid Posted August 25, 2015 Share Posted August 25, 2015 check this RESTRICTING ACCESS TO WEB PAGES Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now