D
D
Denis Goncharenko2018-04-12 16:19:22
CodeIgniter
Denis Goncharenko, 2018-04-12 16:19:22

Why is CodeIgniter throwing a 404?

Some kind of game is going on. Created a Project controller in it's show method.
If you go directly to justdoit/index.php/project/show/aassda everything works fine (the method just displays the argument).
But if I add a rule to .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([0-9a-z]+)$ index.php/project/show/$1
</IfModule>

and go to http://justdoit/ffywf then I get a 404 error. Moreover, the error page is from the engine and not from the server, with the design, supposedly the controller or its method was not found. And if we replace index.php/project/show/$1, for example, with index.php p /project/show/$1, then we get a 404 error with the message:
The requested URL /index.phpp/project/show/asasd was not found on this server.

That is, the rule works correctly and the address is formed correctly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-04-12
@zkelo

Redirect through CodeIgniter's router

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question