Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter Remove index.php from Browser Url

I want to create a app url 'http://example.com'. But entering the url, it shows 'HTTP Error 403.14 - Forbidden'. when i have inserted 'index.php' at the last of url like 'http://example.com/index.php' the landing page is rendering in the browser I have changed the

$config['base_url'] = 'http://example.com';

$config['index_page'] = '';

and

$config['uri_protocol'] = 'REQUEST_URI';

in config.php file. Then i have placed the .htaccess file in the codeigniter root folder along with application and system folder. Then in the .htaccess file i have coded with

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

I just want to remove the 'index.php' from the url. I am using IIS 8.5 web server.

like image 514
anand Avatar asked Aug 31 '26 09:08

anand


1 Answers

  htaccess file
  RewriteEngine on
  RewriteCond $1 !^(index\.php|resources|robots\.txt)
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]

  my site is working http://demo.crowdfundingscript.com/ 
  config file
  $config['uri_protocol']   = 'AUTO';
   $config['index_page'] = '';
like image 160
Rockers Technology Avatar answered Sep 03 '26 00:09

Rockers Technology



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!