• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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....


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.