Note that there are some explanatory texts on larger screens.

plurals
  1. PO$_POST Empty with .htaccess
    text
    copied!<p>I was searching now quite a bit on the internet but can not find any solution. I have an .htaccess file, which rewrites my query string into the GET variable. This works absolutely fine.</p> <p>when it comes to the POST variable, it is the first time I get into this trouble. I have used this .htaccess file already a lot of times on different servers, but now one of my client's server doesn't want to work. When ever I post a form the whole POST variable is empty... I will post my .htaccess file, any help is appreciated.</p> <pre><code>Options +FollowSymLinks Options +Indexes RewriteEngine on RewriteBase / RewriteRule ^pages.*$ /error/404 [L] RewriteRule ^classes.*$ /error/404 [L] RewriteRule ^templates.*$ /error/404 [L] RewriteRule ^common.*$ /error/404 [L] RewriteRule ^([A-Za-z0-9-_]+)/?$ /?p=$1&amp;s=index&amp;a=index&amp;n=index&amp;%{QUERY_STRING} [L] RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/?$ /?p=$1&amp;s=$2&amp;a=index&amp;n=index&amp;%{QUERY_STRING} [L] RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/?$ /?p=$1&amp;s=$2&amp;a=$3&amp;n=index&amp;%{QUERY_STRING} [L] RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/?$ /?p=$1&amp;s=$2&amp;a=$3&amp;n=$4&amp;%{QUERY_STRING} [L] RewriteRule ^([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/([A-Za-z0-9-_]+)/?$ /?p=$1&amp;s=$2&amp;a=$3&amp;n=$4&amp;o=$5&amp;%{QUERY_STRING} [L] ErrorDocument 404 /error/404.php </code></pre> <p>the form looks like this</p> <pre><code> &lt;div class="login"&gt; &lt;form action="/administrator" method="post"&gt; &lt;table cellspacing="0" cellpadding="0" width="100%"&gt; &lt;tr&gt; &lt;td&gt;Username&lt;/td&gt; &lt;td&gt;&lt;input type="text" name="username" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Password&lt;/td&gt; &lt;td&gt;&lt;input type="password" name="passwort" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&lt;input type="submit" value="Anmelden" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; &lt;/div&gt; </code></pre> <p>and the login php file like this</p> <pre><code>&lt;?php session_start(); if( isset($_SESSION['login']) &amp;&amp; $_SESSION['login'] === TRUE ) { header('Location: /administrator'); exit; } if ($_SERVER['REQUEST_METHOD'] == 'POST') { $username = $_POST['username']; $passwort = $_POST['passwort']; $hostname = $_SERVER['HTTP_HOST']; $path = dirname($_SERVER['PHP_SELF']); if ($username == 'xxx' &amp;&amp; $passwort == 'xxx') { $_SESSION['login'] = true; header('Location: /administrator'); exit; } } ?&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload