0

I know there's so many topic about this, but I've tried and that isn't work.

my ci is located at htdocs/codeigniter3

I saw .htaccess inside of codeigniter3/application folder, but I leave it alone. I create new .htaccess on root folder codeigniter3 (outside of application)

my .htaccess is:

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

also on config.php:

$config['base_url'] = 'http://localhost/codeigniter3/';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';

on httpd.conf:

LoadModule rewrite_module modules/mod_rewrite.so

this mod_rewrite.so file also avaiable on apache/modules

2 Answers 2

1

Try this in your .htaccess file

  RewriteEngine On
  RewriteBase /YOUR_PROJECT_NAME
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L]
Sign up to request clarification or add additional context in comments.

1 Comment

well, it's totally works! So, if I rename my project, I should modify it again. hmm... wonder if there's any settings for that
0

Edit your .htaccess

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

it work both local and live form me

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.