403Webshell
Server IP : 202.155.9.250  /  Your IP : 216.73.217.178
Web Server : LiteSpeed
System : Linux srv339029361 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64
User : bigas1846 ( 1044)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/lsws/docs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/lsws/docs/Rewrite_Help.html
<!DOCTYPE html>
<html lang="en-US">
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <title>OpenLiteSpeed Users&#039; Manual - Rewrite</title>
  <meta name="description" content="OpenLiteSpeed Users&#039; Manual - Rewrite." />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="robots" content="noindex">
  <script>
    (function () {
      var theme = 'light';
      var resolved = false;
      try {
        if (window.localStorage) {
          var storedTheme = window.localStorage.getItem('hdoc.theme');
          if (storedTheme === 'light' || storedTheme === 'dark') {
            theme = storedTheme;
            resolved = true;
          }
        }
      } catch (err) {
      }

      if (!resolved && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
        theme = 'dark';
      }

      document.documentElement.setAttribute('data-theme', theme);
      document.documentElement.style.colorScheme = theme;
    }());
  </script>
  <link rel="shortcut icon" href="img/favicon.ico" />
  <link rel="stylesheet" type="text/css" href="css/hdoc.css">
  <link rel="stylesheet" type="text/css" href="css/hdoc-product-accent.css">
  <script src="hdoc-search-index.js" defer></script>
  <script src="js/hdoc-search.js" defer></script>
</head>
<body>
<div class="doc-shell">
<header class="doc-topbar">
  <a class="doc-brand" href="index.html" aria-label="OpenLiteSpeed Users&#039; Manual">
    <img src="img/ols_logo.svg" alt="OpenLiteSpeed logo" />
    <strong>OpenLiteSpeed Users&#039; Manual</strong>
  </a>
<div class="doc-actions">
    <button class="doc-menu-toggle" type="button" aria-label="Open menu" data-menu-toggle aria-expanded="false">
      <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M3 12h18M3 6h18M3 18h18" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
    </button>
    <form class="doc-search" role="search" data-empty="Search pages and settings" data-no-results="No results found.">
      <label class="sr-only" for="doc-search-input">Search the manual</label>
      <div class="doc-search__box">
        <input id="doc-search-input" type="search" autocomplete="off" placeholder="Search pages and settings" aria-controls="doc-search-results" />
        <button type="submit">Search</button>
      </div>
      <div id="doc-search-results" class="doc-search__results" hidden></div>
    </form>
  </div>
  <label class="doc-language"><select id="doc-language-switcher" name="doc_language" data-language-switcher aria-label="Language"><option value="Rewrite_Help.html" data-lang="en-US" selected>English</option><option value="es-ES/Rewrite_Help.html" data-lang="es-ES">Español</option><option value="de-DE/Rewrite_Help.html" data-lang="de-DE">Deutsch</option><option value="fr-FR/Rewrite_Help.html" data-lang="fr-FR">Français</option><option value="zh-CN/Rewrite_Help.html" data-lang="zh-CN">简体中文</option><option value="ja-JP/Rewrite_Help.html" data-lang="ja-JP">日本語</option></select></label>
  <button class="doc-theme-toggle" type="button" aria-label="Toggle theme" data-theme-toggle data-theme-light-label="Light mode" data-theme-dark-label="Dark mode" title="Toggle theme">
    <span class="doc-theme-toggle__icon" aria-hidden="true"></span>
  </button>
</header>
<div class="doc-menu-backdrop" data-menu-backdrop></div>
<div class="pagewrapper" data-current-lang="en-US" data-supported-langs="[&quot;en-US&quot;,&quot;es-ES&quot;,&quot;de-DE&quot;,&quot;fr-FR&quot;,&quot;zh-CN&quot;,&quot;ja-JP&quot;]"><aside class="sidetree"><div class="sidetree__masthead"><figure class="sidetree__figure"><img src="img/ols_logo.svg" alt="OpenLiteSpeed logo" /></figure><div class="sidetree__identity"><a class="sidetree__manual-link" href="index.html">Users&#039; Manual</a><div class="sidetree__version">Version 1.9 — Rev. 4</div></div></div><nav class="sidetree__nav" aria-label="Table of Contents"><ul class="sidetree__list">
      <li><a href="license.html">License</a></li>
      <li><a href="intro.html">Introduction</a></li>
      <li><a href="install.html">Installation/Uninstallation</a></li>
      <li>
        <a href="admin.html">Administration</a>
        <ul class="level2">
          <li><a href="ServerStat_Help.html">Service Manager</a></li>
          <li><a href="Real_Time_Stats_Help.html">Real-Time Stats</a></li>
        </ul>
      </li>
      <li><a href="security.html">Security</a></li>
      <li>
        <a href="config.html">Configuration</a>
        <ul class="level2">
          <li><a href="ServGeneral_Help.html">Server General</a></li>
          <li><a href="ServLog_Help.html">Server Log</a></li>
          <li><a href="ServTuning_Help.html">Server Tuning</a></li>
          <li><a href="ServSecurity_Help.html">Server Security</a></li>
          <li>
            <a href="ExtApp_Help.html">External Apps</a>
            <ul class="level3">
              <li><a href="External_LSAPI.html">LSAPI App</a></li>
              <li><a href="External_WS.html">Web Server (Proxy)</a></li>
              <li><a href="External_FCGI.html">Fast CGI App</a></li>
              <li><a href="External_FCGI_Auth.html">Fast CGI Authorizer</a></li>
              <li><a href="External_SCGI.html">Simple CGI App</a></li>
              <li><a href="External_Servlet.html">Servlet Engine</a></li>
              <li><a href="External_PL.html">Piped Logger</a></li>
              <li><a href="External_LB.html">Load Balancer</a></li>
              <li><a href="External_UWSGI.html">uWSGI</a></li>
            </ul>
          </li>
          <li><a href="ScriptHandler_Help.html">Script Handler</a></li>
          <li><a href="App_Server_Help.html">App Server Settings</a></li>
          <li><a href="Module_Help.html">Module Configuration</a></li>
          <li><a href="Listeners_General_Help.html">Listener General</a></li>
          <li><a href="Listeners_SSL_Help.html">Listener SSL</a></li>
          <li><a href="Templates_Help.html">Virtual Host Templates</a></li>
          <li><a href="VirtualHosts_Help.html">Virtual Host Registration</a></li>
          <li><a href="VHGeneral_Help.html">Virtual Host General</a></li>
          <li><a href="VHSecurity_Help.html">Virtual Host Security</a></li>
          <li><a href="VHSSL_Help.html">Virtual Host SSL</a></li>
          <li><a class="current" href="Rewrite_Help.html">Rewrite</a></li>
          <li>
            <a href="Context_Help.html">Context</a>
            <ul class="level3">
              <li><a href="Static_Context.html">Static Context</a></li>
              <li><a href="Java_Web_App_Context.html">Java Web App Context</a></li>
              <li><a href="Servlet_Context.html">Servlet Context</a></li>
              <li><a href="FCGI_Context.html">Fast CGI Context</a></li>
              <li><a href="SCGI_Context.html">Simple CGI Context</a></li>
              <li><a href="LSAPI_Context.html">LSAPI Context</a></li>
              <li><a href="Proxy_Context.html">Proxy Context</a></li>
              <li><a href="CGI_Context.html">CGI Context</a></li>
              <li><a href="LB_Context.html">Load Balancer Context</a></li>
              <li><a href="Redirect_Context.html">Redirect Context</a></li>
              <li><a href="App_Server_Context.html">App Server Context</a></li>
              <li><a href="UWSGI_Context.html">uWSGI Context</a></li>
              <li><a href="Module_Context.html">Module Handler Context</a></li>
            </ul>
          </li>
          <li><a href="VHWebSocket_Help.html">Web Socket Proxy</a></li>
        </ul>
      </li>
      <li><a href="webconsole.html">Web Console</a>
        <ul class="level2">
          <li><a href="AdminGeneral_Help.html">Admin Console General</a></li>
          <li><a href="AdminSecurity_Help.html">Admin Console Security</a></li>
          <li><a href="AdminListeners_General_Help.html">Admin Listener General</a></li>
          <li><a href="AdminListeners_SSL_Help.html">Admin Listener SSL</a></li>
        </ul>
      </li>
    </ul></nav></aside><article class="contentwrapper"><div class="nav-bar"><div class="prev">&#171 <a href="VHSSL_Help.html">Virtual Host SSL</a></div><div class="center"><a href="config.html">Configuration</a></div><div class="next"><a href="Context_Help.html">Context</a> &#187;</div></div>
<header class="doc-page-header"><h1>Rewrite</h1></header><section class="doc-toc" aria-labelledby="top"><header class="doc-toc__header"><h2 id="top">Table of Contents</h2></header><section class="doc-toc__row"><h3 class="doc-toc__heading">Rewrite Control</h3><ul class="doc-toc__links"><li><a href="#enableRewrite">Enable Rewrite</a></li><li><a href="#autoLoadHtaccess">Auto Load from .htaccess</a></li><li><a href="#rewriteLogLevel">Log Level</a></li></ul></section>
<section class="doc-toc__row"><h3 class="doc-toc__heading">Rewrite Map</h3><ul class="doc-toc__links"><li><a href="#rewriteMapName">Name</a></li><li><a href="#rewriteMapLocation">Location</a></li></ul></section>
<section class="doc-toc__row"><h3 class="doc-toc__heading">Rewrite Rules</h3><ul class="doc-toc__links"><li><a href="#rewriteRules">Rewrite Rules</a></li></ul></section>
</section>
<section class="doc-content-flow"><div class="helpitem"><article class="ls-helpitem"><header class="ls-helpitem__header" id="enableRewrite"><h3>Enable Rewrite<span class="ls-permlink"><a href="#enableRewrite"></a></span></h3></header><h4>Description</h4><p>Specifies whether to enable LiteSpeed's URL rewrite engine. This option can be customized at the virtual host or context level, and is inherited along the directory tree until it is explicitly overridden.</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><header class="ls-helpitem__header" id="autoLoadHtaccess"><h3>Auto Load from .htaccess<span class="ls-permlink"><a href="#autoLoadHtaccess"></a></span></h3></header><h4>Description</h4><p>Autoload rewrite rules contained in a directory's .htaccess file when first accessing that directory if an HttpContext for that directory using the <b>rewritefile</b> directive does not already exist. Once initially loaded, a graceful restart must be performed for any further changes to that .htaccess file to take effect.<br/><br/> Virtual Host-level setting overrides Server-level setting. Default values:<br/><br/> <b>Server-level:</b> No<br/><br/> <b>VH-Level:</b> Inherit Server-level setting</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><header class="ls-helpitem__header" id="rewriteLogLevel"><h3>Log Level<span class="ls-permlink"><a href="#rewriteLogLevel"></a></span></h3></header><h4>Description</h4><p>Specifies the level of detail of the rewrite engine's debug output. This value ranges from <span class="val">0</span> - <span class="val">9</span>. <span class="val">0</span> disables logging. <span class="val">9</span> produces the most detailed log. The server and virtual host's error log <span class="tagl"><a href="ServGeneral_Help.html#log_logLevel">Log Level</a></span>  must be set to at least <span class="val">INFO</span> for this option to take effect. This is useful when testing rewrite rules.</p> <h4>Syntax</h4><p>Integer number</p> <h4>See Also</h4><p class="ls-text-small">Server <span class="tagl"><a href="ServGeneral_Help.html#log_logLevel">Log Level</a></span>, Virtual Host <span class="tagl"><a href="VHGeneral_Help.html#vhlog_logLevel">Log Level</a></span></p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><header class="ls-helpitem__header" id="rewriteMapName"><h3>Name<span class="ls-permlink"><a href="#rewriteMapName"></a></span></h3></header><h4>Description</h4><p>Specifies a unique name for the rewrite map at the virtual host  level. This name will be used by a mapping-reference in rewrite rules. When referencing this name, one of the following syntaxes should be used: <blockquote><code> $\{MapName:LookupKey\}<br/> $\{MapName:LookupKey|DefaultValue\} </code></blockquote><br/> The implementation of LiteSpeed's rewrite engine follows the specifications of Apache's rewrite engine. For more details about rewrite maps, please refer to <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank" rel="noopener noreferrer">Apache's mod_rewrite document</a>.</p> <h4>Syntax</h4><p>string</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><header class="ls-helpitem__header" id="rewriteMapLocation"><h3>Location<span class="ls-permlink"><a href="#rewriteMapLocation"></a></span></h3></header><h4>Description</h4><p>Specifies the location of the rewrite map using the syntax <span class="val">MapType:MapSource</span>.<br/> LiteSpeed's rewrite engine supports three types of rewrite maps: <ul> 	<li><b>Standard Plain Text</b> <blockquote> 		<b>MapType:</b> txt; <br/> 		<b>MapSource:</b> file path to a valid plain ASCII file.  </blockquote> 		Each line of this file should contain two elements separated  		by blank spaces. The first element is the key and the second 		element is the value. Comments can be added with a leading "<span class="val">#</span>" 		sign.  	</li> 	<li><b>Randomized Plain Text</b> <blockquote> 		<b>MapType:</b> rnd;<br/> 		<b>MapSource:</b> file path of a valid plain ASCII file. </blockquote> 		File format is similar to the Standard Plain Text file, except that the 		second element can contain multiple choices separated by a "<span class="val">|</span>" 		sign and chosen randomly by the rewrite engine. 	</li> 	<li><b>Internal Function</b> <blockquote> 	    <b>MapType:</b> int;<br/> 		<b>MapSource:</b> Internal string function  </blockquote> 		4 functions are available: 		<ul> 			<li><b>toupper:</b> converts lookup key to upper cases.</li> 			<li><b>tolower:</b> converts lookup key to lower cases.</li> 			<li><b>escape:</b> perform URL encoding on lookup key.</li> 			<li><b>unescape:</b> perform URL decoding on lookup key.</li> 		</ul> 	</li> 	The following map types available in Apache 	have not been implemented in LiteSpeed:<br/> Hash File and External Rewriting Program. </ul> The implementation of LiteSpeed's rewrite engine follows the specifications of Apache's rewrite engine. For more details about rewrite map, please refer to <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank" rel="noopener noreferrer">Apache's mod_rewrite document</a>.</p> <h4>Syntax</h4><p>String</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><header class="ls-helpitem__header" id="rewriteRules"><h3>Rewrite Rules<span class="ls-permlink"><a href="#rewriteRules"></a></span></h3></header><h4>Description</h4><p>Specifies a list of rewrite rules at the virtual host level.<br/><br/> Do NOT add any document root level rewrite rules here. If you have any document root level rewrite rules from .htaccess, you should instead create a static context with uri "/" and add the rewrite rules there.<br/><br/> A rewrite rule is comprised of one <span class="val">RewriteRule</span> directive and optionally preceded by multiple <span class="val">RewriteCond</span> directives. <ul>   <li>Each directive should take only one line.</li>   <li>     <span class="val">RewriteCond</span> and <span class="val">RewriteRule</span> follow Apache's rewrite     directive syntax. Just copy and paste rewrite directives from your Apache     configuration files.   </li>   <li>     There are minor differences between LiteSpeed and Apache mod_rewrite     implementation:     <ul>       <li>         <span class="val">%\{LA-U:variable\}</span> and <span class="val">%\{LA-F:variable\}</span> are ignored         by the LiteSpeed rewrite engine       </li>       <li>         Two new server variables are added in the LiteSpeed rewrite engine:         <span class="val">%\{CURRENT_URI\}</span> represents the current URI being processed by         the rewrite engine and <span class="val">%\{SCRIPT_NAME\}</span> has the same  meaning         as the corresponding CGI environment variable.       </li>       <li>         The LiteSpeed rewrite engine will stop processing rewrite rules after         encountering an <span class="val">[L]</span> flag to avoid looping while Apache         mod_rewrite will stop processing rewrite rules for the current         iteration only. This behavior is similar to that of the <span class="val">[END]</span>         flag in Apache mod_rewrite.       </li>     </ul>   </li> </ul><br/> The implementation of LiteSpeed's rewrite engine follows Apache's rewrite engine specifications. For more details about rewrite rules, please refer to <a href="https://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank" rel="noopener noreferrer">   Apache's mod_rewrite document </a> and <a href="https://httpd.apache.org/docs/current/rewrite/" target="_blank" rel="noopener noreferrer">   Apache's URL rewriting guide </a>.</p> <h4>Syntax</h4><p>string</p> </article> </div>
</section>
</article></div><button class="doc-back-to-top" type="button" aria-label="Back to top" data-back-to-top><svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 19V5" /><path d="m6 11 6-6 6 6" /></svg><span class="sr-only">Back to top</span></button><footer class="copyright">Copyright &copy; 2013-2026. <a href="https://www.litespeedtech.com">LiteSpeed Technologies Inc.</a> All rights reserved.</footer>
</div>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit