Problem with rewrite htaccess - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem with rewrite htaccess (/showthread.php?tid=39834) |
Problem with rewrite htaccess - El Forum - 03-22-2011 [eluser]jgrmstr[/eluser] Hi, I know there are a lot of threads which deals with htaccess for removing index.php from the url. I manage several sites with CI, but it's the first time I get that problem: All works fine when I navigate with index.php/ in the url. I use that htaccess: Code: RewriteEngine On And when I navigate without the index.php/ in the url, it always loads the view named index.php. Even when I try to get to another controller/method. What could be the problem please? Problem with rewrite htaccess - El Forum - 03-22-2011 [eluser]mlinuxgada[/eluser] Are you certainly sure that mod_rewrite is enabled ? Problem with rewrite htaccess - El Forum - 03-22-2011 [eluser]jgrmstr[/eluser] Yes, in fact this project is in a subdirectory of the main domain. I'm using url rewriting on the main site, so that subdir is mod_rewrite activated I guess!! Problem with rewrite htaccess - El Forum - 03-22-2011 [eluser]mlinuxgada[/eluser] Can you paste please $config['base_url'] = ??, $config['index_page'] = ?? ... I suppose you dont't have strange routes.php ;-). And you can try in your .htaccess RewriteRule ^(.*)$ /msite/badges/index.php/$1 [L] - look at missing '?'. Problem with rewrite htaccess - El Forum - 03-22-2011 [eluser]allaerd[/eluser] i have a project in a sub folder and i use this: Quote: RewriteEngine On works for me! Problem with rewrite htaccess - El Forum - 03-23-2011 [eluser]Unknown[/eluser] I also had a probleme like that and i resolve it just as you told me.tank you very much Problem with rewrite htaccess - El Forum - 03-23-2011 [eluser]jgrmstr[/eluser] Hi, I know it's very often a problem of rewrite rule when people face bugs with that, but here I've just resolved my problem: I set in my config file: Code: $config['uri_protocol'] = 'QUERY_STRING'; |