-
how to protect single htm file from accesing from anothe site
HI There.
This is my first post at dynamicdrive even I am a regular visitor.
I have an single .htm file on my site and I would like to prevent acces to that file if visitor comes from any another site except home site.
I heard that is an simple command that will prevent this.
Thankyou for any answer.
-
-
Possible with .htaccess, I think, but I'm not sure exactly what that command is.
Using PHP you could check the referring page:
$_SERVER['HTTP_REFERER']
You could use an if statement and check if a certain thing exists in it, such as the root of your site (your.com), etc.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks