Welcome Guest, Not a member yet? Register   Sign In
mod_rewrite
#1

hi guys, i'm new to codeigniter, i've been reading the instructions to use this framework properly, but I can't seem to make the .htaccess to work.  Sad

this is in my .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /newbie/

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>

ErrorDocument 404 /index.php
</IfModule>

---------------------------------------------------------------
i have enable mod_rewrite in xampp already, still did not work.

I would really appreciate it if someone would help me.  Blush


Huh  Huh  Huh  Huh  Huh  Huh
Reply
#2

Try this: http://avenir.ro/codeigniter-tutorials/r...ndly-urls/
Reply
#3

(12-07-2014, 06:30 AM)decrypter Wrote: hi guys, i'm new to codeigniter, i've been reading the instructions to use this framework properly, but I can't seem to make the .htaccess to work.  Sad

this is in my .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /newbie/

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>

ErrorDocument 404 /index.php
</IfModule>

---------------------------------------------------------------
i have enable mod_rewrite in xampp already, still did not work.

I would really appreciate it if someone would help me.  Blush


Huh  Huh  Huh  Huh  Huh  Huh


Just simply remove the index.php from the config file :

From this

PHP Code:
$config['index_page'] = 'index.php'

To this

PHP Code:
$config['index_page'] = ''

And paste this in your .htaccess file


Code:
<IfModule mod_rewrite.c>

 Options +FollowSymLinks
 RewriteEngine on

 # Send request via index.php
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>
Romanian CodeIgniter Team :: Translations :: Comunity :: Developers
http://www.codeigniter.com.ro
Reply




Theme © iAndrew 2016 - Forum software by © MyBB