snipt

Ctrl+h for KB shortcuts

ApacheConf

how to turn on mod rewrite for base drupal installation

1
2
3
4
5
6
7
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
https://snipt.net/embed/eabee647cf327ee404acbc89d1cec00e/
/raw/eabee647cf327ee404acbc89d1cec00e/
eabee647cf327ee404acbc89d1cec00e
apacheconf
ApacheConf
7
2019-05-29T19:14:19
True
False
False
/api/public/snipt/2414/
how-to-turn-on-mod-rewrite-for-base-drupal-installation
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">&lt;IfModule</span> <span class="s">mod_rewrite.c</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">RewriteEngine</span> <span class="k">on</span> </span><span id="L-3"><a name="L-3"></a> <span class="nb">RewriteBase</span> / </span><span id="L-4"><a name="L-4"></a> <span class="nb">RewriteCond</span> %{REQUEST_FILENAME} !-f </span><span id="L-5"><a name="L-5"></a> <span class="nb">RewriteCond</span> %{REQUEST_FILENAME} !-d </span><span id="L-6"><a name="L-6"></a> <span class="nb">RewriteRule</span> ^(.*)$ index.php?q=$1 [L,QSA] </span><span id="L-7"><a name="L-7"></a><span class="nt">&lt;/IfModule&gt;</span> </span></pre></div> </td></tr></table>
drupal, htaccess

Text only

set php to run with php5 in htaccess

AddType x-mapp-php5 .php
https://snipt.net/embed/807f2d70419959efdb87cf004610db6e/
/raw/807f2d70419959efdb87cf004610db6e/
807f2d70419959efdb87cf004610db6e
text
Text only
1
2019-05-25T11:34:18
True
False
False
/api/public/snipt/2409/
set-php-to-run-with-php5-in-htaccess
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>AddType x-mapp-php5 .php </span></pre></div> </td></tr></table>
htaccess, php

Text only

turn off php register_globals in htaccess

php_value register_globals 0
https://snipt.net/embed/a1cd815420c754adddb325beee78395c/
/raw/a1cd815420c754adddb325beee78395c/
a1cd815420c754adddb325beee78395c
text
Text only
1
2019-06-17T03:48:08
True
False
False
/api/public/snipt/2408/
turn-off-php-register_globals-in-htaccess
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>php_value register_globals 0 </span></pre></div> </td></tr></table>
htaccess, php

ApacheConf

disable expires header for files ending in txt for using mint with drupal

1
2
3
<FilesMatch "\.(txt)$">
  ExpiresActive Off
</FilesMatch>
https://snipt.net/embed/56bff77530007eac2cb2464bb8b2e253/
/raw/56bff77530007eac2cb2464bb8b2e253/
56bff77530007eac2cb2464bb8b2e253
apacheconf
ApacheConf
3
2019-05-23T10:51:17
True
False
False
/api/public/snipt/2376/
disable-expires-header-for-files-ending-in-txt-for-using-mint-with-drupal
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">&lt;FilesMatch</span> <span class="s">&quot;\.(txt)$&quot;</span><span class="nt">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">ExpiresActive</span> <span class="k">Off</span> </span><span id="L-3"><a name="L-3"></a><span class="nt">&lt;/FilesMatch&gt;</span> </span></pre></div> </td></tr></table>
apache, drupal, htaccess, mint