简体   繁体   中英

How to Fix 404 Error in Codeigniter PHP Framework?

I have a website http://www.example.com . Lots of links this website are show:

404 Error.

For Example here i show my Website 404 URL Link;

http://www.example.com/index.php?/hybrid-mobile-app-development.php

How to Fix this issues?

404 error indicate you try to access file or page that not available for that directory or folder..

so you check your page or file that available Directory that path give..

try this .htaccess file in your root folder

1) .htaccess

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

2) and remove index.php from config.php file

$config['index_page'] = '';

I hope this will work for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM