drop index.php when CI is a sub-dir? - 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: drop index.php when CI is a sub-dir? (/showthread.php?tid=24737) Pages:
1
2
|
drop index.php when CI is a sub-dir? - El Forum - 11-18-2009 [eluser]LiorBroshi[/eluser] Hi There, I can't figure out how to drop index.php from my website's address. the main public_html is used for the actual site assets and everything else is under /codeigniter dir. the structure of the files is: /public_html/ -> /images/ -> /css/-> -> /js/ -> /codeigniter/ ---> /application ---> /system -> index.php now index.php is the CI's started, and inside it the app is defined to: $application_folder = "codeigniter/application"; How can i set CI to avoid index.php (config.php + .htaccess) ? Lior. drop index.php when CI is a sub-dir? - El Forum - 11-18-2009 [eluser]Phil Sturgeon[/eluser] Why not move the index.php into /codeigniter/ and do it as normal? Then modify your .htaccess rule from: Quote:RewriteRule ^(.*)$ index.php/$1 [L] to: Quote:RewriteRule ^(.*)$ codeigniter/index.php/$1 [L] drop index.php when CI is a sub-dir? - El Forum - 12-09-2009 [eluser]LiorBroshi[/eluser] hmmm Now it gives me a 500 Internal Server Error...maybe it became recursive? ;-) drop index.php when CI is a sub-dir? - El Forum - 12-09-2009 [eluser]theprodigy[/eluser] or leave your htaccess file the way it is, Code: RewriteRule ^(.*)$ index.php/$1 [L] drop index.php when CI is a sub-dir? - El Forum - 12-10-2009 [eluser]Phil Sturgeon[/eluser] That would require /codeigniter to be in the URL. Yuck. drop index.php when CI is a sub-dir? - El Forum - 12-10-2009 [eluser]LiorBroshi[/eluser] sooooooooo What Can I do? can someone please show me the entire .htaccess file that I can use when codeigniter is under a /codeigniter dir in the root dir? i'm lost... Lior. drop index.php when CI is a sub-dir? - El Forum - 12-10-2009 [eluser]rogierb[/eluser] It doesnt matter where you index.php is located. As long as the folders are set correctly within index.php and the .htaccess resides in the same folder as index.php You probabaly need something like: config.php: $config['index_page'] = ""; index.php: $system_folder = "codeigniter/system"; $application_folder = "codeigniter/application"; .htaccess RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] drop index.php when CI is a sub-dir? - El Forum - 12-30-2009 [eluser]razzatrox[/eluser] I got mine to work with this: " RewriteEngine on RewriteCond $1 !^(index\.php|images|css) RewriteRule ^(.*)$ /CodeIgniter/index.php/$1 [L] " drop index.php when CI is a sub-dir? - El Forum - 01-06-2010 [eluser]LiorBroshi[/eluser] err now I get Internal Server Error.... What should I do? drop index.php when CI is a sub-dir? - El Forum - 01-06-2010 [eluser]rogierb[/eluser] It might be usefull if you post your .htaccess and other related information. We are willing to help but without information that is just impossible. |