1

I am also having the same problem and I have tried almost every code available online for .htaccess

My Xamp is running on Linux, FYI - The application is on intranet not on internet, may be that cause some problem.

I have checked that mod_rewrite is enabled. it is showing under loaded modules when I run php.info() function.

In my config file

$config['base_url'] = ''; 
$config['index_page'] = '';
$config['uri_protocol' = 'AUTO';

my working url is arteri is a subdirectory in root http://whintranet.wh.tvh.ca/arteri/index.php/artery/home but when I removes index.php from it

The requested URL /arteri/artery/home was not found on this server. Apache/2.2.15 (CentOS) Server at whintranet.wh.tvh.ca Port 80

my.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /arteri/

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>

any help greately appreciated

1
  • There's a missing closing bracket in the snippet from your config file ['uri_protocol'] ... also, you may need to add QSA to your last RewriteRule: RewriteRule ^(.*)$ index.php?/$1 [QSA,L] Commented Aug 2, 2013 at 19:20

1 Answer 1

0

Set your base url to the absolute path including protocol as stated in this answer. Don't forget the trailing slash

$config['base_url'] = 'http://whintranet.wh.tvh.ca/arteri/'; 
$config['index_page'] = '';
$config['uri_protocol' = 'AUTO';

Set your htaccess according to this answer

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

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.