Welcome Guest, Not a member yet? Register   Sign In
404 in all routes
#1

(This post was last modified: 04-18-2020, 02:07 AM by jreklund.)

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!
Reply
#2

Did you set your ./application/config/config.php files base_url?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(This post was last modified: 04-18-2020, 04:14 AM by bargoldi.)

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!
Reply
#4

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

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

Should be:
'http://new-domain/wr/'
Reply
#5

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

:/
Reply
#6

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.
Reply
#7

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.
Reply
#8

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).
Reply
#9

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

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB