• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem form_open with .htaccess

#1
[eluser]aataqwa[/eluser]
Hallo All...

I have problem form_open with .htaccess

in config.php
Code:
$config['base_url']    = "http://ci.tes/";
$config['index_page'] = "";
$config['uri_protocol']    = "REQUEST_URI";

.htaccess file
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [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>

in my view:
Code:
&lt;?php
$udata = array('name'=>'username','id'=>'u','size'=>15);
$pdata = array('name'=>'password','id'=>'p','size'=>15);
echo form_open('welcome/verify');
echo "<p><label for='u'>Username</label><br/>";
echo form_input($udata) . "</p>";
echo "<p><label for='p'>Password</label><br/>";
echo form_password($pdata) . "</p>";
echo form_submit('submit','login');
echo form_close();
?&gt;

where is wrong...? if click submit login, data don't post??
but if
Code:
echo form_open('index.php/welcome/verify')
;
it's normaly or success..?

sorry for my english bad...

thank you,
regards

#2
[eluser]Unknown[/eluser]
Change your base_url to this:
Code:
$config['base_url']    = "http://ci.tes/index.php/";

#3
[eluser]InsiteFX[/eluser]
And what does it say for the url to your site in broswer address bar? That's what your base_url should be.

InsiteFX


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.