Issue with URL's |
[eluser]evolve08[/eluser]
Hello all, new user of CI, but long time PHP programmer and web developer. I'll jump right into it. I seem to be having some issues with links. The default action is index, however if the URL isn't set to <controller>/index URL's become messed up and I'm not really sure why (they point to the default route). So, <controller>/ and <controller>/index are not acting the same way, and I think they should be. I know I can avoid the problem by using the anchor helper, however I'm converting a pre-existing script with a lot of links and would rather not change them all within the view. Hope I am explaining this correctly.
[eluser]evolve08[/eluser]
Let me try to explain this a little clearer. Say I have a URL http://127.0.0.1/fence/components Everything works fine with links like: Code: <a href="./components/view/<?=$row->id?>">view</a> However say I have the URL: http://127.0.0.1/fence/components/index Then the links which worked fine before point to something similar to... http://127.0.0.1/fence/components/components/edit/12 Which is correct technically, but I need a way to prevent or stop this, I'm hoping its simply a configuration option somewhere. Thanks in advance.
[eluser]Rick Jolly[/eluser]
Three options: Code: // 1. using the "base" tag in the "head" you can use relative urls: |
Welcome Guest, Not a member yet? Register Sign In |