Welcome Guest, Not a member yet? Register   Sign In
The requested URL was not found on this server
#1

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,
Reply
#2

I guess because .htaccess but please post simple code so we can analysis your problem.
Reply
#3

and also your router may be
Reply
#4

(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;
Reply
#5

i think in your config.php file your base_url should be like

$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'];
Reply
#6

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]
Reply
#7

(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.

You might also try adding a ? after index in this line:
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

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.
Reply
#8

(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.

You might also try adding a ? after index in this line:
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

Looks like this did the trick; thanks for the tip
Reply
#9

(06-08-2015, 09:37 PM)johancelis Wrote:
(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;

thank you, this works to my issues.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB