remove index.php problem - 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: remove index.php problem (/showthread.php?tid=25567) |
remove index.php problem - El Forum - 12-16-2009 [eluser]WebbHelp[/eluser] Hi! I got a problem with removing the index.php in the path. 1. Here is the link: http://www.nkpg-stad.se/ I got that error, with the .htaccess file in the root(/public_html), with the codeigniter files and everything! the htaccess: Code: RewriteEngine on ------------------------------------------- 2. I also tried it on my xampp - apache server! There I got the .htaccess file in htdocs/cms (htdocs/cms/.htaccess) So there I got this "code": Code: RewriteEngine on Btw, it works a little bit, I don't need to write index.php, BUT there is no design, the design is gone, I suppose that it is the path's which is wrong. How can I solve these 2 problems? Thanks //WebbHelp remove index.php problem - El Forum - 12-16-2009 [eluser]Ben Edmunds[/eluser] Do you have mod_rewrite enabled? Is the base_url in your config.php file correct? remove index.php problem - El Forum - 12-17-2009 [eluser]WebbHelp[/eluser] Yes, I am pretty sure it is enabled and the base_url path is, where I got the files, in the "ftp"-page I got it into the root: http://www.nkpg-stad.se/ In my htdocs - apache server, the pathi so to /cms, because I got the files in there! remove index.php problem - El Forum - 12-17-2009 [eluser]Colin Williams[/eluser] :down: remove index.php problem - El Forum - 12-17-2009 [eluser]WebbHelp[/eluser] ?? :S remove index.php problem - El Forum - 12-17-2009 [eluser]esskay[/eluser] Webhelp, You need to exclude css images etc from the rewrite . something like this . RewriteCond $1 !^(index\.php|images|css|js|uploads|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L] ~Ess remove index.php problem - El Forum - 12-17-2009 [eluser]Ben Edmunds[/eluser] Here's a sample htaccess you can use. Make sure the change the names as applicable. RewriteCond $1 !^(index\.php|(.*)\.swf|images|css|downloads|js|robots\.txt|favicon\.ico|sitemap\.xml) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php?$1 [L,QSA] |