Your question doesn't make much sense. Try to lay it out clearly.
You say that you don't want anyone to be able to access it, but then you say that you must chmod it 777 - giving everone access. You then jump to not wanting a URL reference to be accessible. It's a set of conflicting requirements as you've laid them out.
Also, it would be useful to know what platform you are on (Linux/Unix), the distribution and release, what web server software you are using.
may be useful for the future.