snipt

Ctrl+h for KB shortcuts

Text only

Different Directory Index Page in .htaccess

1
2
3
4
5
6
7
# Sample 1: 
DirectoryIndex index2.html
 
# Sample 2: 
DirectoryIndex index2.php

source: http://apphp.com/index.php?snippet=htaccess-different-directory-index-page
https://snipt.net/embed/5d34ee29a364c2aa8b7905c06c6b662f/
/raw/5d34ee29a364c2aa8b7905c06c6b662f/
5d34ee29a364c2aa8b7905c06c6b662f
text
Text only
7
2019-07-06T06:34:15
True
False
False
Feb 16, 2014 at 03:23 AM
/api/public/snipt/114085/
different-directory-index-page-in-htaccess
<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># Sample 1: </span><span id="L-2"><a name="L-2"></a>DirectoryIndex index2.html </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a># Sample 2: </span><span id="L-5"><a name="L-5"></a>DirectoryIndex index2.php </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>source: http://apphp.com/index.php?snippet=htaccess-different-directory-index-page </span></pre></div> </td></tr></table>
apphp, htaccess

Text only

Increment php upload file size (add in htaccess)

php_value post_max_size 30M
php_value upload_max_filesize 30M
https://snipt.net/embed/23b1348ea164525fe04eb511ff37121d/
/raw/23b1348ea164525fe04eb511ff37121d/
23b1348ea164525fe04eb511ff37121d
text
Text only
2
2016-12-24T10:14:27
True
False
True
Jan 11, 2014 at 01:42 PM
/api/public/snipt/105048/
increment-php-upload-file-size-add-in-htaccess
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>php_value post_max_size 30M </span><span id="L-2"><a name="L-2"></a>php_value upload_max_filesize 30M </span></pre></div> </td></tr></table>
htaccess, php, wordpress

Text only

Clean up urls

1
2
3
4
5
6
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]
https://snipt.net/embed/d27b37233746775b185b4d23606e1174/
/raw/d27b37233746775b185b4d23606e1174/
d27b37233746775b185b4d23606e1174
text
Text only
6
2019-07-12T21:45:54
True
False
False
Nov 28, 2013 at 12:17 PM
/api/public/snipt/97343/
clean-up-urls
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>Options -MultiViews </span><span id="L-2"><a name="L-2"></a>RewriteEngine On </span><span id="L-3"><a name="L-3"></a>RewriteBase / </span><span id="L-4"><a name="L-4"></a>RewriteCond %{REQUEST_FILENAME} !-f </span><span id="L-5"><a name="L-5"></a>RewriteCond %{REQUEST_FILENAME} !-d </span><span id="L-6"><a name="L-6"></a>RewriteRule ^(.*)$ $1.php [L] </span></pre></div> </td></tr></table>
"clean urls", "pretty urls", htaccess