Welcome Guest, Not a member yet? Register   Sign In
Redirection increase the length of my URL
#11

[eluser]dunicorn[/eluser]
if it was
Code:
http://localhost/abc/index.php?ref=main
after redirection, the url in the browser will be
Code:
http://localhost/abc/index.php/index.php?ref=home
#12

[eluser]Narkboy[/eluser]
RTFM.

From user guide:

Please note: If you are using query strings you will have to build your own URLs, rather than utilizing the URL helpers (and other helpers that generate URLs, like some of the form helpers) as these are designed to work with segment based URLs.

Redirect is a URL Helper function - ALL of which go some way to building the URL for you.

Either:
Code:
$config['index_page'] = '';

and use mod_rewrite to direct things, or manually redirect using PHP functions, not CI.

The user_guide is your friend. Know it and love it.




Theme © iAndrew 2016 - Forum software by © MyBB