CodeIgniter Forums
Routes file doesn't work - 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: Routes file doesn't work (/showthread.php?tid=68175)



Routes file doesn't work - Maurice - 06-05-2017

I will give you my files first, and after that I will explain my problem:

application/config/routes.php filehttps://pastebin.com/jbBeqmEs
application/controllers/Users.php filehttps://pastebin.com/6KwPn5Cq
application/view/users/registration.php filehttps://pastebin.com/ZrY8nhxu

When I try to enter my beta domain, which is


Code:
http://drpciv.mauriceltd.co.uk/registration

I recieve 

Quote:404
Not Found
The resource requested could not be found on this server!

But I declared the route in the route.php file.. I read everything about routing from documentation but still I don't have any ideea why this doesn't work.


RE: Routes file doesn't work - Sarog - 06-06-2017

change directory

application/users/registration.php

to

application/view/users/registration.php


RE: Routes file doesn't work - msnisha - 06-07-2017

Hi Maurice,

Do you have proper .htaccess file in the root path of your website? It should be there to route the request to your index.php file. First check whether http://drpciv.mauriceltd.co.uk/index.php/registration is working. If that is the case then the issues with your .htaccess file.

If so, you can follow the article here at http://www.thephpcode.com/blog/view/removing-index.php-from-website-url-codeigniter.html to fix the issue.


RE: Routes file doesn't work - Maurice - 06-07-2017

The directory is correct, I mistyped.


RE: Routes file doesn't work - Maurice - 06-09-2017

I did the .htaccess thing and the problem is not that, now I still get 404 error code, but in an CodeIgniter template display


RE: Routes file doesn't work - InsiteFX - 06-09-2017

In your form you are not telling it where to go on the action field.


RE: Routes file doesn't work - Paradinight - 06-09-2017

(06-09-2017, 06:37 AM)Maurice Wrote: I did the .htaccess thing and the problem is not that, now I still get 404 error code, but in an CodeIgniter template display

application/controllers/Users.php <- is the real name of the file the first letter uppercase too? did you try http://drpciv.mauriceltd.co.uk/users/registration ?

InsiteFX
action is not required. Maurice can not access http://drpciv.mauriceltd.co.uk/registration