Welcome Guest, Not a member yet? Register   Sign In
Getting 404 when I add a new controller
#1

[eluser]CharleyW[/eluser]
I have a working site with a .htaccess file.

Notice I said "working".

I made a copy of a working controller and gave it a new name.

I made a copy of a working view and gave it a new name.

In both cases the new name is the existing name with a "n" added to the end.

I modified the controller copy to load the view that has an "n" append to it's name.

When I upload the new controller and new view (to the correct folders and try to execute the controller (with "http://sitename.com/namen") I get at error 404 (from CI).

Any clues - I am running PHP4, 1.7.2, nothing esoteric.

Again - this is a live (formerly) working site. All existing pages work - just not this new one.

TIA.
#2

[eluser]CharleyW[/eluser]
duh ...
#3

[eluser]WanWizard[/eluser]
What do you mean 'duh'? Expecting an answer within 4 minutes?

Did you also rename the controller class, and the controller class constructor, to match the name of the file?
You will get a 404 if the controller file can be loaded, but doesn't contain a class with the same name.
#4

[eluser]CharleyW[/eluser]
The "duh" was when I realized I had not renamed the controller class.

No, I did not expect an answer in four minutes.

Thanks for the explanation.
#5

[eluser]WanWizard[/eluser]
Ok. Next time finish your sentence, would have saved me some typin'... Smile




Theme © iAndrew 2016 - Forum software by © MyBB