close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

how to protect a file from regular URL Access

Thread began 9/27/2010 11:33 am by chriswestuk415409 | Last modified 9/27/2010 1:30 pm by Jason Byrnes | 1236 views | 3 replies |

Christopher WestCommunity Expert

how to protect a file from regular URL Access

Hi there, my head is spinning from this logical problem

ok, here is the problem, I require a user to be logged into website, then they can get a link which points to a file (the admin has recently uploaded (its a pdf document). ok thats simple right....well "what if" another user knows the filename of that document and also knows the website address where that file would be uploaded to. this means they they would not need to be logged into the website. they can simple go directly to that file..this ia really important to me that i can stop this type of access..

obviously cannot do theis using file permissions of folders in FTP client because that means the link i provide on ther website will also not be able to access the same file.

I have thought about .htaccess but i dont know what to change in that file. I thought about "masking" the filename or directory name but having no success with that at the moment. if the solution is .htaccess then not sure if the bottom of the browser would still display the true link.

also it is documented that i upload files off the website root. however how cna i do this? I am using a shared hosting. so how could i access off the site root?

chris

Sign in to reply to this post

Jason ByrnesWebAssist

the only way to protect the file from URL access is to place it outside of the web root.

Contact your host to see what your options are for creating a location outside of the webroot for storing files. If they will not allow for storing files outside of the web root, you will need to find another hosting option.

Sign in to reply to this post

Christopher WestCommunity Expert

outside the web root

ok that does make sense. once i have found a hosting that will allow me to do this, could you give me an example on how i could use php code to reference a file outside the web root? (at the moment i am storing the file name in a database field and using it as dynamic link text on my page...but how would i change this so that it references outside my web root??

chris

Sign in to reply to this post

Jason ByrnesWebAssist

Use the Download File behavior built into Universal Email.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...