I am using htaccess to set up "clean urls" on a site. The url pathname is then passed to an index.php file as variables. For example, if I type in ' www.mysite.com/football/cowboys ' , htaccess will access www.mysite.com/index.php?variable1=football&variable2=cowboys . It seems that flash player and/or swfobject will not allow access to the flash file which is located in the root directory with the index.php file. If I type the above url without the ' /cowboys ' , then everything works fine. So the problem has to do with the browser url being in a different directory than root when trying to access a flash file in the root. I can't even check the flash player version when the browser url isn't in the root directory. Am I explaining myself well enough? Is there a solution?
since you are using mod_rewrite, you will want to use absolute paths to your swfs:
use "/myswf.swf" instead of "myswf.swf" since the browser will think it is in the /cowboys directory even though the swf and the html page are in the same folder on the server.
Thank you for replying so quickly and THANK YOU for swfobject, karma ++++. I have tried both "/myswf.swf" and "myswf.swf" and "http://www.mysite.com/myswf.swf" . They all provide me with the same results. If this shouldn't be happening, then maybe it is a problem with how I have my htaccess mod_rewrite setup, but I can see the swf if I type it's url directly into browser. The actual site I am working on is at http://www.wildjoescoffee.com . When you type in http://www.wildjoescoffee.com/menu/beer , it is broken. If you leave off the "/beer", the site performs correctly.
The site I am working on is currently password protected:
I have even tried changing my htaccess mod_rewrite to look on the root for all swf files. I can now view my swf (which is located in the root) by typing in any number of subdirectories after the domain name followed by the swf name. This didn't change anything.
Is there a way to check whether flash is available while I am using clean urls that are several "subdirectories" deep? I don't need to rewrite the flashcontent div, I only need to check to see if flash plugin is available. If the plugin is available, I can use javascript to change the window location back to the root and add an anchor hash with the rest of the url pathname. I am successfully able to do this until I add an extra subdirectory to the url.
My site is listed in the previous comment, along with a password and username to view it.