CodeIgniter Forums
.htaccess restricting access to flash preventing xml to load - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: .htaccess restricting access to flash preventing xml to load (/showthread.php?tid=4932)



.htaccess restricting access to flash preventing xml to load - El Forum - 12-25-2007

[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 :-)


.htaccess restricting access to flash preventing xml to load - El Forum - 12-25-2007

[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


.htaccess restricting access to flash preventing xml to load - El Forum - 12-25-2007

[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


.htaccess restricting access to flash preventing xml to load - El Forum - 06-04-2008

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


.htaccess restricting access to flash preventing xml to load - El Forum - 11-23-2008

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


.htaccess restricting access to flash preventing xml to load - El Forum - 11-24-2008

[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.