Welcome Guest, Not a member yet? Register   Sign In
noob problem: ¿How must i build the links?
#1

[eluser]josepichu[/eluser]
Code:
<a href="controller/method"> link </a>
#2

[eluser]josepichu[/eluser]
Code:
<a href="controller/method"> link </a>

This one don't work if a I'm for example inside controller_2/method_2...

I think maybe the problem is my .htaccess, it is (removed index.php):

Code:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !^(/index\.php|/images|/js|/css)
  RewriteRule ^(.*)$ /project/index.php?/$1 [L]
</IfModule>

¿Do you understand me?

thks.
#3

[eluser]josepichu[/eluser]
OK! i have solved it putting base_url() before de links !

thanks !
#4

[eluser]mejlo[/eluser]
prefer to use this
Code:
$this->load->helper('url');

$link = site_url('controller/method');
#5

[eluser]josepichu[/eluser]
Yes, me too.

thanks....




Theme © iAndrew 2016 - Forum software by © MyBB