![]() |
url - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: url (/showthread.php?tid=6698) |
url - El Forum - 03-08-2008 [eluser]nuttynibbles[/eluser] hi, im a newbie with codeigniter and i watched the tutorial video.so from the video they called class Blog Function comments by this <?anchor('blog/comments','Comments')?>. and the url will be http://example.com/CodeIgniter/index.php/blog/comments. my question is, how can i call the same function where the url will be http://example.com/CodeIgniter/blog/comments. remove the index.php from the url. url - El Forum - 03-08-2008 [eluser]nuttynibbles[/eluser] okay the problem with me is these: my index page is at http://domain.com/codeigniter/index.php. well naturally http://domain.com/codeigniter will also display the same page. in this page it has a link. for example, <a href="blog/comments">comments</a> if i click the link, it redirects to http://domain.com/codeigniter/blog/comments which will not work. it says sorry page not found. but if i type in the url as http://domain.com/codeigniter/index.php/blog/comments, then it works. i tried removing the index.php by editing .htaccess but it wont work. here how it looks like: Options All -Indexes RewriteEngine on Rewriterule ^(.*)\.*$ codeigniter/index.php RewriteOptions MaxRedirects=3 #RewriteEngine on #RewriteCond $1 !^(index\.php|images|robots\.txt) #RewriteRule ^(.*)$ /index.php/$1 [L] url - El Forum - 03-09-2008 [eluser]Avatar[/eluser] remove index.php in your config.php file Code: $config['index_page']=""; Code: Options -indexes url - El Forum - 03-09-2008 [eluser]dmiden[/eluser] Also, if you use nuttynibbles outcommented snippet you will have to add all the "exclusive" path/files to the RewriteCond "$1 !^(index\.php|images|robots\.txt) " |