Guest User

Untitled

a guest
Nov 21st, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. #
  2.  
  3. # Apache/PHP/Drupal settings:
  4.  
  5. #
  6.  
  7.  
  8.  
  9. # Protect files and directories from prying eyes.
  10.  
  11. <FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  12.  
  13. Order allow,deny
  14.  
  15. </FilesMatch>
  16.  
  17.  
  18.  
  19. # Don't show directory listings for URLs which map to a directory.
  20.  
  21. Options -Indexes
  22.  
  23.  
  24.  
  25. # Follow symbolic links in this directory.
  26.  
  27. Options +FollowSymLinks
  28.  
  29.  
  30.  
  31. # Customized error messages.
  32.  
  33. ErrorDocument 404 /index.php
  34.  
  35.  
  36.  
  37. # Set the default handler.
  38.  
  39. DirectoryIndex index.php
  40.  
  41.  
  42.  
  43. # Override PHP settings. More in sites/default/settings.php
  44.  
  45. # but the following cannot be changed at runtime.
  46.  
  47.  
  48.  
  49. # PHP 4, Apache 1.
  50.  
  51. <IfModule mod_php4.c>
  52.  
  53. php_value magic_quotes_gpc 0
  54.  
  55. php_value register_globals 0
  56.  
  57. php_value session.auto_start 0
  58.  
  59. php_value mbstring.http_input pass
  60.  
  61. php_value mbstring.http_output pass
  62.  
  63. php_value mbstring.encoding_translation 0
  64.  
  65. </IfModule>
  66.  
  67.  
  68.  
  69. # PHP 4, Apache 2.
  70.  
  71. <IfModule sapi_apache2.c>
  72.  
  73. php_value magic_quotes_gpc 0
  74.  
  75. php_value register_globals 0
  76.  
  77. php_value session.auto_start 0
  78.  
  79. php_value mbstring.http_input pass
  80.  
  81. php_value mbstring.http_output pass
  82.  
  83. php_value mbstring.encoding_translation 0
  84.  
  85. </IfModule>
  86.  
  87.  
  88.  
  89. # PHP 5, Apache 1 and 2.
  90.  
  91. <IfModule mod_php5.c>
  92.  
  93. php_value magic_quotes_gpc 0
  94.  
  95. php_value register_globals 0
  96.  
  97. php_value session.auto_start 0
  98.  
  99. php_value mbstring.http_input pass
  100.  
  101. php_value mbstring.http_output pass
  102.  
  103. php_value mbstring.encoding_translation 0
  104.  
  105. php_value xdebug.profiler_output_dir /tmp
  106.  
  107. php_value xdebug.profiler_output_name timestamp
  108.  
  109. php_value xdebug.profiler_enable 1
  110.  
  111. php_value xdebug.auto_trace 1
  112.  
  113. php_value xdebug.trace_format 1
  114.  
  115. php_value xdebug.trace_output_name timestamp
  116.  
  117.  
  118.  
  119.  
  120.  
  121. </IfModule>
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. # Requires mod_expires to be enabled.
  130.  
  131. <IfModule mod_expires.c>
  132.  
  133. # Enable expirations.
  134.  
  135. ExpiresActive On
  136.  
  137. # Cache all files for 2 weeks after access (A).
  138.  
  139. ExpiresDefault A1209600
  140.  
  141. # Do not cache dynamically generated pages.
  142.  
  143. ExpiresByType text/html A1
  144.  
  145. </IfModule>
  146.  
  147.  
  148.  
  149. # Various rewrite rules.
  150.  
  151. <IfModule mod_rewrite.c>
  152.  
  153. RewriteEngine on
  154.  
  155.  
  156.  
  157. # If your site can be accessed both with and without the 'www.' prefix, you
  158.  
  159. # can use one of the following settings to redirect users to your preferred
  160.  
  161. # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  162.  
  163. #
  164.  
  165. # To redirect all users to access the site WITH the 'www.' prefix,
  166.  
  167. # (http://example.com/... will be redirected to http://www.example.com/...)
  168.  
  169. # adapt and uncomment the following:
  170.  
  171. # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  172.  
  173. # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  174.  
  175. #
  176.  
  177. # To redirect all users to access the site WITHOUT the 'www.' prefix,
  178.  
  179. # (http://www.example.com/... will be redirected to http://example.com/...)
  180.  
  181. # adapt and uncomment the following:
  182.  
  183. # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  184.  
  185. # RewriteRule ^(.*)$ http://examplecom/$1 [L,R=301]
  186.  
  187.  
  188.  
  189. # Modify the RewriteBase if you are using Drupal in a subdirectory and
  190.  
  191. # the rewrite rules are not working properly.
  192.  
  193. # RewriteBase /drupal
  194.  
  195.  
  196.  
  197. # Rewrite old-style URLs of the form 'node.php?id=x'.
  198.  
  199. #RewriteCond %{REQUEST_FILENAME} !-f
  200.  
  201. #RewriteCond %{REQUEST_FILENAME} !-d
  202.  
  203. #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  204.  
  205. #RewriteRule node.php index.php?q=node/view/%1 [L]
  206.  
  207.  
  208.  
  209. # Rewrite old-style URLs of the form 'module.php?mod=x'.
  210.  
  211. #RewriteCond %{REQUEST_FILENAME} !-f
  212.  
  213. #RewriteCond %{REQUEST_FILENAME} !-d
  214.  
  215. #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  216.  
  217. #RewriteRule module.php index.php?q=%1 [L]
  218.  
  219.  
  220.  
  221. # Rewrite current-style URLs of the form 'index.php?q=x'.
  222.  
  223. RewriteCond %{REQUEST_FILENAME} !-f
  224.  
  225. RewriteCond %{REQUEST_FILENAME} !-d
  226.  
  227. RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  228.  
  229. </IfModule>
  230.  
  231.  
  232.  
  233. # $Id: .htaccess,v 1.81.2.3 2007/09/21 12:24:22 drumm Exp $
Advertisement
Add Comment
Please, Sign In to add comment