N00b having troubles with links... |
[eluser]cyberbuff[/eluser]
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 127.0.0.1/login instead of 127.0.0.1/index.php/login. 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. Randy
[eluser]cyberbuff[/eluser]
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. Regards
[eluser]Dan Decker[/eluser]
Are you using Code: echo anchor(); Code: echo anchor('controller/function'); Hope this helps.
[eluser]jrad[/eluser]
try pasting your .htaccess file here. maybe there's something wrong in the URLs you specified there..
[eluser]cyberbuff[/eluser]
i just put: RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] |
Welcome Guest, Not a member yet? Register Sign In |