Advertisement
Guest User

Untitled

a guest
Jun 28th, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine on
  3.  
  4. #
  5. # Uncomment the statement below if you want to make use of
  6. # HTTP authentication and it does not already work.
  7. # This could be required if you are for example using PHP via Apache CGI.
  8. #
  9. #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  10.  
  11. #
  12. # The following 3 lines will rewrite URLs passed through the front controller
  13. # to not require app.php in the actual URL. In other words, a controller is
  14. # by default accessed at /app.php/my/controller, but can also be accessed at
  15. # /my/controller
  16. #
  17. RewriteCond %{REQUEST_FILENAME} !-f
  18. RewriteCond %{REQUEST_FILENAME} !-d
  19. RewriteRule ^(.*)$ app.php [QSA,L]
  20.  
  21. #
  22. # If symbolic links are not already being followed,
  23. # uncomment the line below.
  24. # http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
  25. #
  26. #Options +FollowSymLinks
  27. </IfModule>
  28.  
  29. # With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
  30. # module mod_authz_host to a new module called mod_access_compat (which may be
  31. # disabled) and a new "Require" syntax has been introduced to mod_authz_host.
  32. # We could just conditionally provide both versions, but unfortunately Apache
  33. # does not explicitly tell us its version if the module mod_version is not
  34. # available. In this case, we check for the availability of module
  35. # mod_authz_core (which should be on 2.4 or higher only) as a best guess.
  36. <IfModule mod_version.c>
  37. <IfVersion < 2.4>
  38. <Files "config.php">
  39. Order Allow,Deny
  40. Deny from All
  41. </Files>
  42. <Files "common.php">
  43. Order Allow,Deny
  44. Deny from All
  45. </Files>
  46. </IfVersion>
  47. <IfVersion >= 2.4>
  48. <Files "config.php">
  49. Require all denied
  50. </Files>
  51. <Files "common.php">
  52. Require all denied
  53. </Files>
  54. </IfVersion>
  55. </IfModule>
  56. <IfModule !mod_version.c>
  57. <IfModule !mod_authz_core.c>
  58. <Files "config.php">
  59. Order Allow,Deny
  60. Deny from All
  61. </Files>
  62. <Files "common.php">
  63. Order Allow,Deny
  64. Deny from All
  65. </Files>
  66. </IfModule>
  67. <IfModule mod_authz_core.c>
  68. <Files "config.php">
  69. Require all denied
  70. </Files>
  71. <Files "common.php">
  72. Require all denied
  73. </Files>
  74. </IfModule>
  75. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement