Jump to content

restrict access


John Smith

Recommended Posts

Posted

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)

If you find my post useful or if it helped you, please like my post :)
Ingame name: ZoeN

560x95_FFFFFF_FF9900_000000_000000.png

Posted

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 xD

If you find my post useful or if it helped you, please like my post :)
Ingame name: ZoeN

560x95_FFFFFF_FF9900_000000_000000.png

Posted

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

Posted

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.

Posted
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..

If you find my post useful or if it helped you, please like my post :)
Ingame name: ZoeN

560x95_FFFFFF_FF9900_000000_000000.png

Posted
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..

are you sure you typed the correct name (.htaccess) and your webserver is Apache?

Posted
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..

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

If you find my post useful or if it helped you, please like my post :)
Ingame name: ZoeN

560x95_FFFFFF_FF9900_000000_000000.png

Posted

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...