Welcome Guest, Not a member yet? Register   Sign In
SOLVED - Routing works but also gives apache 404 error
#1

[eluser]DrDave[/eluser]
I have a custom route defined in my application so that "http://www.site.com/details/id" is routed to the details controller, index method like so:

Code:
$route['details/(:num)'] = "details/index/$1";

It works just fine, but I noticed that my apache error log is filling up with 404's stating that /path/to/details doesn't exist.

I checked in firebug, and it is 404'ing on the id. For example if I enter "http://www.site.com/details/50" it tries to get "50" and can't find it, yet the page still loads fine and everything works.

Has anyone run across this before? Any suggestions on how I can stop it?

Thanks!
#2

[eluser]DrDave[/eluser]
I did further checking because I have other routes defined, and none of them cause the apache 404 error, and they appear to be set up in an identical way.

For example:

Code:
$route['category/(:any)'] = "listings/display_listings/$1";

When I visit "http://www.site.com/category/automotive" it tries to GET "automotive" and succeeds - no 404. I'm totally baffled!
#3

[eluser]DrDave[/eluser]
I found the problem. I had something in my .htaccess which was causing a conflict with an install of wordpress in a subfolder.




Theme © iAndrew 2016 - Forum software by © MyBB