Welcome Guest, Not a member yet? Register   Sign In
CI 3 input post not working when removed index.php
#1

Hi, i made forms many times before in CI 2 and everything worked fine on local and remote server all the time.
On local machine everything work fine even with CI 3 but when i uploaded file on server, as soon as i removed the index.php by removing it from config file like this: $config['index_page'] = '';  and in the htaccess like this: RewriteRule ^(.*)$ index.php?/$1 [L]
suddently the form doesn't send any post data to the controller. If i don't remove the index.php from url everything works fine,
i guess could be something concerning the htaccess but i'm totally lost..

This is my htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
   
    RewriteCond %{HTTP_HOST} ^mysite\.com
    RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
   
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

Really hope someone could help..
Thanks in advance!
Reply


Messages In This Thread
CI 3 input post not working when removed index.php - by Johnny Stec - 05-06-2015, 09:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB