Welcome Guest, Not a member yet? Register   Sign In
N00b having troubles with links...

Hello all!
First a BIG thanks to Rick Ellis for such a great framework.
I am a newbie with codeigniter and somewhat a newbie with php. (Learnt it myself and in a month) I am having a problem with linking pages. I have a global header. Some links are there. My problem is that I can't set it to static pages. I mean if it's on the domain level then ok. But if it's not the links are getting wrong. I tried with setting a base_url in the config.php file and adding url to the helper library. But it doesn't work.

I have the following links: Home (index), Login (/login), Register (/register) and some other...
also on the homepage...it's only showing a instead of Am i missing something? or being a dumbo?

[eluser]Randy Casburn[/eluser]
Hey cyberbuff and welcome to a great place to be!

To start off, I hate to send you back to the docs, but I think that might be where your answer is. Try reviewing this page http://ellislab.com/codeigniter/user-gui.../urls.html and see if that clears things up a little.

If not, come back and clarify what you mean using the terms on that page and we'll get things going for you.


thanks Randy. I forgot to mention i tried with .htaccess and it gives me an error 500. I put the .htaccess file in the root folder.

[eluser]Dan Decker[/eluser]
Are you using
echo anchor();
in your links? With the anchor function from the url helper you build your url thusly;
echo anchor('controller/function');

Hope this helps.

Daniel, thanks for the tip. I will try with it.

try pasting your .htaccess file here. maybe there's something wrong in the URLs you specified there..

i just put:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Theme © iAndrew 2016 - Forum software by © MyBB