View Single Post
Old 02-14-2010, 05:34 PM  
harvey
Confirmed User
 
harvey's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: 127.0.0.1
Posts: 9,266
Quote:
Originally Posted by Si View Post
It's ok I have got it working by putting it onto a subdomain.

I was doing the file (made a mistake above) e.g.: /path/folder/file.js

Would be nice to know a rule for .htaccess to stop it from rewriting a path though if anybody knows how to do it?
again, it has nothing to do with wordpress nor htaccess, it was something you did.

If you used /path/folder/file.js you'll ALWAYS get a 404. You need to use php bloginfo('template_directory') to locate the file, like the example below:

Code:
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/scripts/my_js_file.js"></script>
__________________
This post is endorsed by CIA, KGB, MI6, the Mafia, Illuminati, Kim Jong Il, Worldwide Ninjas Association, Klingon Empire and lolcats. Don't mess around with it, just accept it and embrace the truth

Last edited by harvey; 02-14-2010 at 05:37 PM..
harvey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote