We have many gaming websites, among them I am hosting exclusive games on my server, and i don\'t want to access my games to other websites from my server. I want to restrict the
Doing this via JavaScript is limited in how it will restrict the content to the browser level. You might be better off Apache mod_rewrite
to more effectively block content on a server level as explained here.
For example, this code you could place in an .htaccess
file if your server supports it. I am using www.abc.com
as an example & matching swf
& fla
files as an example:
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?abc.com/.*$ [NC]
RewriteRule ^.*\.(swf|fla)$ - [F]