CodeIgniter Forums
404 in all routes - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: 404 in all routes (/showthread.php?tid=76167)



404 in all routes - bargoldi - 04-18-2020

Hi guys. I'm new to CodeIgniter.

The previous developer has shut his server and left me with the backup only.
I moved a site to a new Server.

The project includes both Wordpress and integration with a CI project.
What bothers me is that I get 404 Error for every CI route.

I tried several things with no change.
I tried changing the .htaccess
I tried changing the env

Nothing really helped.
I'm also running on a host.

Thanks a lot guys for your help!


RE: 404 in all routes - InsiteFX - 04-18-2020

Did you set your ./application/config/config.php files base_url?


RE: 404 in all routes - bargoldi - 04-18-2020

My base_url:
$config['base_url'] = _Env::BASE_URL;

My ENV BASE_URL:
'http://new-domain/wr'

My structure:
wp-admin/
wp-content/
wp-incudes/
wr/

the wr (the CI part) folder contains:
ci/
->application/
->system/

Please note that it's the same structure as the last server except for the different domain.

Thanks a lot!


RE: 404 in all routes - jreklund - 04-18-2020

Hi, it may be so simple that a forward slash are missing.

This:
'http://new-domain/wr'

Should be:
'http://new-domain/wr/'


RE: 404 in all routes - bargoldi - 04-18-2020

Unfortunately tried all of the following suffixes:
'/'
'/wr/'
''
'/wr'

:/


RE: 404 in all routes - jreklund - 04-18-2020

Can you take a screenshot of the 404 error, as sometimes it's not CodeIgniters error but a server related one. It can be hard to tell the difference for the untrained eye. :-)

PS. Blurr out/crop out your domain.


RE: 404 in all routes - bargoldi - 04-18-2020

The response isn't really giving us anything.
The project Is a WP with CI views as iframes inside.
The 404 error in the network of the Developer Tools is a regular one.
While the content inside the response error is the just WP site itself, a whole bunch of html.


RE: 404 in all routes - jreklund - 04-18-2020

If it's giving you a Wordpress 404 inside a iframe that should load CI, your server dosen't find CodeIgniter. Try loading it manually (without iframe).


RE: 404 in all routes - bargoldi - 04-18-2020

No success. Same URL, if I take it into the browser, it returns the WP page (as 404 returns)


RE: 404 in all routes - jreklund - 04-18-2020

It's not a CodeIgniter problem then. It's your server configuration. With the information provided, you would be better off asking your hosting provider for help, they usually have guys who can help you check your configuration. Wordpress are picking up every url, even the one that should be excluded.