• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error 404 on the server side (no error on local)

#1
[eluser]Toams[/eluser]
Hi,
I am new in CI. I started a new web site with CI.
Sorry for my bad english Smile
I have an error. On local all is ok.
I put my website on a directory on the server.
(www/dev/mysite)
but when I write in a browser www.mysite.fr/dev/mysite, I have an error 404.
Do you have any ideas ?
All the files are the same (local/web).
Thank you for your help.

#2
[eluser]Bart v B[/eluser]
Did you also edit in your /config/config.php
$config['base_url'] = http://www.mysite.fr/dev/mysite/
Wink

#3
[eluser]Toams[/eluser]
Even with this line in the config file, I have an 404 error

#4
[eluser]Toams[/eluser]
Always impossible to have my first pagge. I have an 404 error.
I've changed my config file, and put the good base url.

#5
[eluser]Bart v B[/eluser]
And how is your .htaccess looking Wink

I think that you need some modefication also there..

Because as how i see it you have a folder used for your website. So you need to say to apache that your application is in that folder..

<IfModule mod_rewrite.c>
RewriteEngine On

# normaly you use: RewriteBase /
RewriteBase /mysite/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
</IfModule>

#6
[eluser]Toams[/eluser]
Ok, thank you for that...
where I should write this code ?
I will test as soon as I know where I sould put this code...

#7
[eluser]Bart v B[/eluser]
Just place it in a .htacces file.
upload it in your directory where your index.php is.
That should be in your case in the mysite folder Wink

#8
[eluser]Toams[/eluser]
<IfModule mod_rewrite.c>
RewriteEngine On
# normaly you use: RewriteBase /
RewriteBase /dev/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#‘system’ can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn’t true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
# If we don’t have mod_rewrite installed, all 404’s
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
</IfModule>

I put this in the folder ,
but 404 error Sad

#9
[eluser]Bart v B[/eluser]
ok... were back..

Can you give some more info aboute how your ci installation is standig?

Do you have php on your server?

Can you show us how your setup is?

i mean the folders?
Do you have a controller called mysite?
Do you have isapi installed? (something link apache modrewrite)
A clean install of codeigniter? what gives that for example?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.