0

I have creating a website using codeigniter framework which having following link like (xyz.in/index.php/abc) but I want to open my index page using only xyz.in. how can I do this? Please help me.

Thank You

omkara
  • 974
  • 5
  • 24
  • 50
  • also change $config['index_page'] = 'index.php'; to $config['index_page'] = ''; in config file – hrishi Jul 18 '17 at 13:28
  • Possible duplicate of [CodeIgniter removing index.php from url](https://stackoverflow.com/questions/19183311/codeigniter-removing-index-php-from-url) –  Jul 18 '17 at 13:45
  • Set `$route['default_controller'] = 'abc';` in `APPPATH.'config/routes.php'`. – Tpojka Jul 18 '17 at 14:44
  • https://github.com/wolfgang1983/htaccess_for_codeigniter –  Jul 18 '17 at 21:53

2 Answers2

0

have you tried with .htaccess file

RewriteEngine On
RewriteBase /root_folder_name/
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|js|uploads|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

more info -> CodeIgniter removing index.php from url

JohnWayne
  • 651
  • 9
  • 28
  • yes, look at this RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] – omkara Jul 18 '17 at 12:56
0
 RewriteEngine on
 RewriteCond $1 !^(index\.php|resources|robots\.txt)
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Make .htaccess file put this code in it and place the file outside your Application folder.

Gulfam Arshad
  • 73
  • 1
  • 8