snipt

Ctrl+h for KB shortcuts

Text only

Uniserver mod rewrite enabled

1
2
3
4
5
6
Uniserver mod rewrite

Put this at the end of the .htaccess file located in /udrive/www/

Options +FollowSymLinks
RewriteEngine On
https://snipt.net/embed/4ed026ecbeb46f7d5f42c57d842a110c/
/raw/4ed026ecbeb46f7d5f42c57d842a110c/
4ed026ecbeb46f7d5f42c57d842a110c
text
Text only
6
2019-07-22T14:05:33
True
False
False
/api/public/snipt/8948/
uniserver-mod-rewrite-enabled
<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>Uniserver mod rewrite </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>Put this at the end of the .htaccess file located in /udrive/www/ </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>Options +FollowSymLinks </span><span id="L-6"><a name="L-6"></a>RewriteEngine On </span></pre></div> </td></tr></table>
htaccess, modrewrite, uniserver

ApacheConf

Redirection HTTPS via le mod rewrite

1
2
3
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.xxx.com/$1 [R,L]
https://snipt.net/embed/948f3b0f6b07780fa5ddf28e86c61379/
/raw/948f3b0f6b07780fa5ddf28e86c61379/
948f3b0f6b07780fa5ddf28e86c61379
apacheconf
ApacheConf
4
2019-07-20T21:16:47
True
False
False
/api/public/snipt/4185/
redirection-https-via-le-mod-rewrite
<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="nb">RewriteEngine</span> <span class="k">On</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">RewriteCond</span> %{SERVER_PORT} <span class="m">80</span> </span><span id="L-3"><a name="L-3"></a><span class="nb">RewriteRule</span> ^(.*)$ https://www.xxx.com/$1 [R,L] </span></pre></div> </td></tr></table>
admin, apache, apache2, https, modrewrite, redirection, serveur, ssl

ApacheConf

modrewrite static page

1
2
3
4
5
6
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !/index.html
RewriteCond %{REQUEST_URI} !gif$

RewriteRule .* /index.html [R=302,L]
https://snipt.net/embed/d8cd9c9857f60ae6c07e3af7df1d7290/
/raw/d8cd9c9857f60ae6c07e3af7df1d7290/
d8cd9c9857f60ae6c07e3af7df1d7290
apacheconf
ApacheConf
6
2019-07-21T02:52:19
True
False
False
/api/public/snipt/2463/
modrewrite-static-page
<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><span class="nb">RewriteEngine</span> <span class="k">On</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">RewriteBase</span> / </span><span id="L-3"><a name="L-3"></a><span class="nb">RewriteCond</span> %{REQUEST_URI} !/index.html </span><span id="L-4"><a name="L-4"></a><span class="nb">RewriteCond</span> %{REQUEST_URI} !gif$ </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a><span class="nb">RewriteRule</span> .* <span class="sx">/index.html</span> [R=302,L] </span></pre></div> </td></tr></table>
modrewrite