# PHP question -- protect .SWF from hotlinking within MySpace... -- HELP!

**URL:** <https://forum.kirupa.com/t/php-question-protect-swf-from-hotlinking-within-myspace-help/195270>\
**Category:** programming\
**Created:** [July 30, 2006, 9:28am UTC](https://forum.kirupa.com/t/php-question-protect-swf-from-hotlinking-within-myspace-help/195270 "2006-07-30T09:28:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![th3Phallex](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@th3Phallex](https://forum.kirupa.com/u/th3Phallex)\
**Post date:** [July 30, 2006, 9:28am UTC](https://forum.kirupa.com/t/php-question-protect-swf-from-hotlinking-within-myspace-help/195270/1 "2006-07-30T09:28:13Z")

</div>

Hey guys…

I have a .swf on my myspace page, that I want to show up in my profile.  
As an example, let’s say my myspace URL is “[myspace.com/12345/](http://myspace.com/12345/)”.

Well, it seems as though some jacka$s has decided to try and embed **MY** flash movie into his myspace page as well, without my consent at all.  
Let’s say his myspace URL is “[myspace.com/54321/](http://myspace.com/54321/)”.

I know that in Apache’s .htaccess file, you can limit which folders can be accessed. Here’s an example of what you would add into the .htaccess file:

```php
RewriteEngine on 
RewriteCond %{HTTP_REFERER} !^$ 
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC] 
RewriteRule \.(swf)$ - [F]

```

My problem is that I still want to allow access to my .SWF file from within MY OWN myspace URL (ex: “[myspace.com/12345/](http://myspace.com/12345/)”), but not anyone else’s.

\*\*Is this possible?? \*\*

\*\*PLEASE HELP! \*\*  
**Plagarism sucks!**
