CodeIgniter Forums
htaccess question - 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: htaccess question (/showthread.php?tid=5567)



htaccess question - El Forum - 01-26-2008

[eluser]alebenson[/eluser]
i have mi CodeIngniter inside a ci/ folder
www.site.com/ci/

i guess thats why the htaccess is not working.
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

what do i have to change to take the index.php off ?


htaccess question - El Forum - 01-26-2008

[eluser]zdknudsen[/eluser]
I think one of these will fix it.

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /ci/index.php/$1 [L]

or

Code:
RewriteEngine on
RewriteBase /ci
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]



htaccess question - El Forum - 01-26-2008

[eluser]alebenson[/eluser]
hey there!..

i'v try the second one but didnt work on the base so i make a .htaccess inside /ci/ and put that code there

when i try www.site.com/ci/blog/
i got this error
Quote:Not Found
The requested URL /index.php/blog was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

the i add /ci/ to the RewriteRule (like the first one)-
Code:
RewriteRule ^(.*)$ /ci/index.php/$1 [L]

i got:
Quote:No input file specified.

still not working


htaccess question - El Forum - 01-26-2008

[eluser]dawnerd[/eluser]
For some reason, some hosts have some weird configuration going on *cough* mediatemple

Anyways, if you do this
Code:
RewriteRule ^(.*)$ /ci/index.php?/$1 [L]

That usually fixes a lot.