CodeIgniter Forums
slash in 'anchor' - 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: slash in 'anchor' (/showthread.php?tid=10457)



slash in 'anchor' - El Forum - 07-31-2008

[eluser]johnmiller[/eluser]
Hi all...

I have a doubt in putting slashes in 'anchor'

suppose below given is my code

Code:
anchor ('example.com/class/function/ID/', click me);

but when i view this in address bar, i won't get slash at the end (means, after ID)

in the address bar, i want it like http://example.com/class/function/ID/

but i get http://example.com/class/function/ID (without slash in the end)

how to add slash at the end???


slash in 'anchor' - El Forum - 08-01-2008

[eluser]johnmiller[/eluser]
does anybody know the answer?


slash in 'anchor' - El Forum - 08-01-2008

[eluser]codex[/eluser]
It's true, the slash will not be appended to the link. Instead what you can do is open up config.php, go to
Code:
$config['url_suffix'] = "";

and add the slash as suffix. Slashes will now automatically be appended to every url.


slash in 'anchor' - El Forum - 08-01-2008

[eluser]johnmiller[/eluser]
yes i got it....
thanks a lot... :-)