The requested URL was not found on this server |
Hi,
I have copied my code from a publicly available server to my own machine. I had to change a few settings to make it run locally such as the base_url. When I access my site (using WAMP) I get the following error: The requested URL was not found....'. I have create a custom controller that gets called when I arrive at my default controller. Within that custom controller I redirect the user to a login page. On my public site it works fine and locally it cannot find it. Any suggestions for debugging? Thanks,
I guess because .htaccess but please post simple code so we can analysis your problem.
(06-08-2015, 07:18 PM)freddy Wrote: and also your router may be .htaccess: RewriteEngine on RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] Router: $route['default_controller'] = 'welcome'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE;
i think in your config.php file your base_url should be like
$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'];
Are all of your filenames like how the userguide specifies? Windows doesn't care about case sensitivity for filenames, but just about every other OS in the world does.
You might also try adding a ? after index in this line: RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
(06-09-2015, 07:14 AM)CroNiX Wrote: Are all of your filenames like how the userguide specifies? Windows doesn't care about case sensitivity for filenames, but just about every other OS in the world does. I will check that, I moved the site from one.com to my windows machine. I remember when I renamed a file, first letter changed from or to uppercase, that on windows I saw 1 file but on the file manager of on.com I saw 2, one with uppercase and one with lowercase.
(06-09-2015, 07:14 AM)CroNiX Wrote: Are all of your filenames like how the userguide specifies? Windows doesn't care about case sensitivity for filenames, but just about every other OS in the world does. Looks like this did the trick; thanks for the tip
(06-08-2015, 09:37 PM)johancelis Wrote:(06-08-2015, 07:18 PM)freddy Wrote: and also your router may be |
Welcome Guest, Not a member yet? Register Sign In |