Welcome Guest, Not a member yet? Register   Sign In
.htaccess restricting access to flash preventing xml to load
#1

[eluser]exodus7[/eluser]
Hey guys, I seem to be having a little problem. I have a flash movie which resides in a folder named 'spotlight' in the root directory. When the movie is loaded from my view,it is unable to load the xml file, but the movie loads fine. Both the xml file and the movie are located within the 'spotlight' folder.

Im assuming it has something to do with the .htaccess file because I can run it locally on my machine while referencing the files from the 'spotlight' folder on the server. I've tried using just about every example i've found in this forum, and I'm still experiencing the same issue. Here's what my .htaccess file currently looks like:



.htaccess:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|javascript|spotlight|includes|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]


Any thoughts or ideas to try would be greatly appreciated :-)
#2

[eluser]alexsancho[/eluser]
try this .htaccess rules instead, in this way, apache only redirects if the requested file/folder doesn't exists

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [QSA,L]

Greets
#3

[eluser]exodus7[/eluser]
Alex,

That did the trick - The flash movie is working smoothly, and the 404's are handled through CI

Thank you for the quick response - Merry Christmas
#4

[eluser]UF Sebastian[/eluser]
Thanks Alex Sancho your solution is genius!
#5

[eluser]onsetrese[/eluser]
alexsancho, your a genius, tnx a lot...
#6

[eluser]uptime[/eluser]
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|javascript|spotlight|includes|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

This is way more secure...

It means that CI will handle everything but <images OR css OR javascript, etc...>


If you're using:

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [QSA,L]

Please make sure you also add:

Code:
Options -Indexes

There could be a common scenario in which a folder will be listed because it exists and does not have an index page.

P.S.: I use the same idea with iptables rules (block everything but ...) or just about anything... And I don't consider myself a paranoid.




Theme © iAndrew 2016 - Forum software by © MyBB