CodeIgniter Forums
Problem form_open with .htaccess - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem form_open with .htaccess (/showthread.php?tid=12264)



Problem form_open with .htaccess - El Forum - 10-12-2008

[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


Problem form_open with .htaccess - El Forum - 06-01-2011

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



Problem form_open with .htaccess - El Forum - 06-01-2011

[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