I am in the process of updating the long overdue CI 2.something to CI 3.1.11. So far so good except for the form data which is lost. Neither $this->input->post('usr')
nor $_POST
hold any values at all. Empty!
After looking through some answers I figured that my htaccess might be at fault – however it does seem to do its job alright in every other case...
I run PHP 7.3.9 on Apache2. mod_rewrite
is on.
Here is my htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
It might be the htaccess file OR something else. Any ideas?
UPD: To add to confusion: the Apache log for this one request at vhost http://esp.atlas.local reads:
127.0.0.1 - - [19/Oct/2019:23:00:42 +0200] "POST /admin/ HTTP/1.1" 301 236
127.0.0.1 - - [19/Oct/2019:23:00:42 +0200] "GET /admin HTTP/1.1" 200 4592
UPD2: The confusion is cleared: I submit the form to the same URL which means it first posts
to it and then gets
the HTML view from it.
Anyway, I am starting to question my morality as I've tried every possible htaccess configuration (even got one from Lumen/Laravel project I run on the same machine) and I either get nothing or I get 403 forbidden (which is new, but still doesn't solve anything). Any further ideas?