Welcome Guest, Not a member yet? Register   Sign In
getting 404s for my CI urls
#1

[eluser]philk[/eluser]
I'm trying to get a local copy of a site working under WAMP, the index.php loads fine, but the urls linked through CI don't work at all, I just get a generic 404 page, not even the CI 404 page.

I have changed this to local host >
Code:
$config['base_url']    = "http://localhost/";

within config.php but no joy.

If I change the default controller to 'welcome' instead of
Code:
$route['default_controller'] = "pages";

within routes.php, I at least get a CI error message


Code:
An Error Was Encountered

Unable to load the requested file: welcome_message.php

That's as far as I have got, can anyone help. I'm new to all this and more of a designer than a developer, but I need to get the site running locally for the redesign. Thanks
#2

[eluser]Sarfaraz Momin[/eluser]
well I can give you one suggestion on this. Use XAMPP, It suits best for CI development. I had a developer struggling to setup his WAMP to work with CI. Let me know if you need any help with it.

Good Day !!!!
#3

[eluser]philk[/eluser]
Look I know it's completely boring dealing with a n00b question that has been asked a 1000 times before, but surely there's a simple solution to this, anyone?
#4

[eluser]philk[/eluser]
woops simultaneous posting. I'm on xp pro x64 and xampp just throws fits, a complete load of exceptions with the mysql admin, so I kind of have to use wamp or the old apache, php, mysql solution. Surely there must be something I can do here?

I've already been through the process of uninstalling my setup, installing wamp, installing the db, uninstalling everything, installing xampp, lots of falling around the place, uninstalling xampp, reinstalling wamp and the db, and tinkering for hours trying to get it going. This is turning out harder than I expected...

If I install the basic CI install under wamp it works fine - welcome etc.
#5

[eluser]Pascal Kriete[/eluser]
So what you're saying is the default install works, but what your programmer has given you doesn't?

What happens if you create a new controller in the default install and link to it?
#6

[eluser]philk[/eluser]
Yes I suppose I am - if I create a new controller in the default and link to it it works just great
#7

[eluser]philk[/eluser]
I think I need a .htaccess file but when I try to create one in the root it doesn't let me name it .htaccess, says 'you must type a filename'
#8

[eluser]Pascal Kriete[/eluser]
Ok, I finally understand your problem. Go to application/config/config.php and set the index page:
Code:
$config['index_page'] = "index.php";

If your programmer uses the CI anchor() function to create links they should now work correctly.
#9

[eluser]philk[/eluser]
Thanks for this, I appreciate it.
That line is already in config.php exactly as you have it!
#10

[eluser]Pascal Kriete[/eluser]
Ok let's work from the bottom up - can you give us an example link that is generated (view source in your browser).




Theme © iAndrew 2016 - Forum software by © MyBB