CodeIgniter Forums

Full Version: htaccess question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]alebenson[/eluser]
i have mi CodeIngniter inside a ci/ folder
http://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 ?

El Forum

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

El Forum

[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 http://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

El Forum

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