/SampleApplication/ColdBox3/.htaccess

http://github.com/bobsilverberg/ValidateThisColdBoxPlugin · #! · 38 lines · 31 code · 7 blank · 0 comment · 0 complexity · f1f0a388f876691c1d006c8dfc73c143 MD5 · raw file

  1. RewriteEngine on
  2. #RepeatLimit 0
  3. #SQL Injection Protection --Read More www.cybercrime.gov
  4. #Please use these rules if below words does not conflict with your friendly-urls. You may modify accordingly.
  5. RewriteRule ^.*EXEC\(@.*$ /notfound.htm [L,F,NC]
  6. RewriteRule ^.*CAST\(.*$ /notfound.htm [L,F,NC]
  7. RewriteRule ^.*DECLARE.*$ /notfound.htm [L,F,NC]
  8. RewriteRule ^.*DECLARE%20.*$ /notfound.htm [L,F,NC]
  9. RewriteRule ^.*NVARCHAR.*$ /notfound.htm [L,F,NC]
  10. RewriteRule ^.*sp_password.*$ /notfound.htm [L,F,NC]
  11. RewriteRule ^.*%20xp_.*$ /notfound.htm [L,F,NC]
  12. #if this call related to CFIDE then just pass as it
  13. RewriteCond %{REQUEST_URI} ^/(.*(CFIDE|cfide|CFFormGateway|jrunscripts|railo-context|fckeditor)).*$
  14. RewriteRule ^(.*)$ - [NC,L]
  15. #dealing with flash / flex communication
  16. RewriteCond %{REQUEST_URI} ^/(.*(flashservices|flex2gateway|flex-remoting)).*$
  17. RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L]
  18. #if image request then deliver as it is. otherwise not found message
  19. RewriteCond %{REQUEST_URI} \.(bmp|gif|jpe?g|png)$
  20. RewriteRule ^(.*)$ - [NC,L]
  21. #Ignore CSS or JS files and this would be last rule --if the condition matched
  22. RewriteCond %{REQUEST_URI} \.(css|js)$
  23. RewriteRule ^(.*)$ - [NC,L]
  24. #Ignore txt/doc/pdf/xls files and this would be last rule --if the condition matched
  25. RewriteCond %{REQUEST_URI} \.(txt|pdf|doc|xls|xml)$
  26. RewriteRule ^(.*)$ - [NC,L]
  27. #if there index.cfm or /blog/entry like pattern then forward request to index.cfm with query string
  28. RewriteRule ^$ index.cfm [QSA]
  29. RewriteCond %{REQUEST_FILENAME} !-f
  30. RewriteCond %{REQUEST_FILENAME} !-d
  31. RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L]