0

My .htaccess file contains following lines:

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

My config.php has following lines:

$config['base_url'] = 'http://localhost/Shifas/Codeigniter/CodeIgniter-2.2.6'; $config['index_page'] = ''; $config['uri_protocol'] = 'REQUEST_URI'; 

Default controller is Stud_controller

2 Answers 2

1

The value you provide to $config['base_url'] must have a trailing slash. Try

$config['base_url'] = 'http://localhost/Shifas/Codeigniter/CodeIgniter-2.2.6/'; 
Sign up to request clarification or add additional context in comments.

5 Comments

Is there anything to change on wamp??
Actually Iam new to php
It is very possible that you need to change the WAMP setup. Typically localhost is mapped to a directory. If the mapping is correct then $config['base_url'] = 'http://localhost/'; might be all you need.
Can you please tell me how to change the wamp setup?
Sorry, it has been too many years since I messed with WAMP and I don't remember. Maybe this john-dugan.com/wamp-vhost-setup will help
0

You may have to allow mod_rewrite on apache https://www.digitalocean.com/community/tutorials/how-to-rewrite-urls-with-mod_rewrite-for-apache-on-ubuntu-16-04

You also need a trailing slash:

$config['base_url'] = 'http://localhost/Shifas/Codeigniter/CodeIgniter-2.2.6/'; $config['uri_protocol'] = 'AUTO'; 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.