Results 1 to 12 of 12

Thread: Bar Access to a Site except a Link from another Site

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Bar Access to a Site except a Link from another Site

    Let say, make it simple, my domain name is abc.com, when people click a hyperlink in the abc.com, it will go to abc.com/123.html. Can I restrict the visitor, ie they can only visit the abc.com/123.html through clicking the hyperlink at abc.com ? I mean, the visitor cannot go directly into abc.com/123.html, just by keying in the abc.com/123.html at their search box (toolbar).

    Let me tell you my intention behind. My main page is abc.com, which is an opt-in page to capture visitors' database. There is a link at the abc.com to abc.com/123.html. Then at the abc.com/123.html, there are good stuffs for people to download free. In order to prevent people just copy the link abc.com/123.html and paste it into their emails (send to thier friends), then I have to do something on the protection, ie bar people directly access into abc.com/123.html. if visitors want to access into the abc.com/123.html, they have to key in their database at abc.com.

    What is the script (should be pasted at the abc.com/123.html) ? I need it.

  2. #2
    Hyperactive Member kayos's Avatar
    Join Date
    Apr 2004
    Location
    Largo, Florida
    Posts
    306

    Re: Bar Access to a Site except a Link from another Site

    try looking into Request.ServerVariables("HTTP_REFERER")


    If this post helps, please RATE MY POST!

    Using Visual Studio 2005 SE

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Bar Access to a Site except a Link from another Site

    Thank you for your info.

    Sorry to say that I don't really understand what it is. Let me tell you my backgroud, I'm an Accountant, has no bckground of Java script. For scripts, I used to copy & paste, that's all.

    Can any one else give me a better simple script solution ?

  4. #4
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: Bar Access to a Site except a Link from another Site

    There will be no simple script solution.
    If you are going to host files on a server, people will have access to them by simpling entering a URL.
    Unless you implement some type of site security as in a members area or a login with the files in a database people will be able to link directly.
    Truly, you have a dizzying intellect.

  5. #5
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Bar Access to a Site except a Link from another Site

    there are a couple ways to do it, first does your server support ASP?

  6. #6

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Bar Access to a Site except a Link from another Site

    My server does not support ASP.

    Some people recommended my to use htaccess to restrict access abc.com/123.html except a link from abc.com. I just had a chat with the server owner, a lady said that htaccess does not this way.

    She recommended me to look for a script.

    Any other simple solution, just cut & paste the script (I'm a layman, technically not sound at all) ?

  7. #7
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Bar Access to a Site except a Link from another Site

    What Server do they use? IIS, Apache, .. etc?

    and yes, i have an ASP script that would do it but ....
    Last edited by rory; Dec 7th, 2006 at 10:26 PM.

  8. #8

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Bar Access to a Site except a Link from another Site

    They are using Apache web server on all their servers, at 3ix.

    Any good news ?

  9. #9
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Bar Access to a Site except a Link from another Site

    nah .. if it was IIS i could help .. you might want to check to see what server pages they support, Php, etc, and look at that route.

    client side javascript may be able to do something, but it wont be secure.

  10. #10

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Bar Access to a Site except a Link from another Site

    Security side is not important to me.

    "Client side javascript may be able to do something", this is what I want, ant proposal ?

  11. #11
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Bar Access to a Site except a Link from another Site

    Might want to post this in the HTML, Javascript forum in that case .. would get more exposure from other members who maybe able to assist in that area better. Im not 100% sure about how to do it in Javascript, without searching google myself .

  12. #12

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    6

    Re: Bar Access to a Site except a Link from another Site

    Thanks, Rory.

    Guys, any other simple solution ? Especially the script. If you have the script, may send to chimoong @ gmail .com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width