Welcome Guest, Not a member yet? Register   Sign In
url
#1

[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.
#2

[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]
#3

[eluser]Avatar[/eluser]
remove index.php in your config.php file
Code:
$config['index_page']="";
here is my htaccess just in case
Code:
Options -indexes
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]
#4

[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) "




Theme © iAndrew 2016 - Forum software by © MyBB