CodeIgniter Forums

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

El Forum

[eluser]Garrisonx[/eluser]
Hi folks im a newbie in this CI framework i been using Ci for a few weeks now and im reading the box of wrox and watch all the videos from jefrey way cause im really interested in learn how to use proper CI.
but im havving a problem with the htaccess file to remove the index.php from the url
cause when i put the code inside it not only removes the index.php it also removes everything. so when i put the .htaccess file i cant access the page and when i remove the .htaccess file i can go back again
let me put the code down here of mi htaccess file
Code:
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/ci_series/index.php/$1 [L]
this one removes the index.php but also the ci_series folder i try removing the /ci_series/ part but it does the same thing
i think maybe i have to remove something from my httpd.conf im using currently appserv as mi apache server and i see the guys in the videos remove index.php so easily

what can i do i thought maybe change to mamp but im a windows user
thank you very much for everything

El Forum

[eluser]danmontgomery[/eluser]
There needs to be a space between (.*) and the redirect target, and you're missing the end of line metacharacter ($)... Also, if CI is in a subfolder, you should specify it using rewritebase

Code:
RewriteEngine On
RewriteBase /ci_series/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

El Forum

[eluser]Garrisonx[/eluser]
Nop it doesnt work
this is mi htaccess and im going to atach an image showin how mi folder is in www in mi appserv
and i correct mi htaccess but the folder it doesnt even apear in mi localhost

i try this way
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(. *)$ ci_series/index.php/$1 [L]
and this way 2
Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(. *)$ /ci_series/index.php/$1 [L]

El Forum

[eluser]InsiteFX[/eluser]
.htaccess

This file should be placed in the directory were your index file is.

Code:
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

InsiteFX