Welcome Guest, Not a member yet? Register   Sign In
Routing - Form submission appends segments to my URL
#1

[eluser]1cookie[/eluser]
hi

I'm following along with: http://ellislab.com/codeigniter/user-gui...l#overview
only when I submit my page (and with each subsequent submit), my URL gets appended with /localhost.

I start with:
Code:
http://localhost/CItutorials/form
and the form displays fine. Upon submitting the form with fields blank; the validation error reporting works fine; but the URL turns to:

Code:
http://localhost/CItutorials/localhost/form
Keep pressing the button and:

Code:
http://localhost/CItutorials/localhost/localhost/form
Code:
http://localhost/CItutorials/localhost/localhost/localhost/form
etc....

Ive tried tinkering with the routes.php script:

Code:
$route['default_controller'] = 'form';
$route['(:any)'] = 'form/index';

I have a .htaccess file on the root directory enabling clean URLs:

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Config seems fine:
Code:
$config['base_url'] = 'localhost/';



I'm a bit stumped! I think it is something to do with routes, but it flumaxes me?

help..
Smile













Theme © iAndrew 2016 - Forum software by © MyBB