Welcome Guest, Not a member yet? Register   Sign In
404 in the server
#1

[eluser]josepichu[/eluser]
Hi!

i'm trying to upload my CI application to the server. i haven't issues in localhost, but in the server i have a 404 server error, not PHP.

I suppose the problem is something in my .htaccess file, here is it (I work in a subfolder)

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /guaguas/

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

    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    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>

Help please!

thanks.
#2

[eluser]weboap[/eluser]
change this line
Code:
RewriteBase /guaguas/

to
Code:
RewriteBase /
#3

[eluser]josepichu[/eluser]
[quote author="weboap" date="1338576393"]change this line
Code:
RewriteBase /guaguas/

to
Code:
RewriteBase /
[/quote]

But I Work in a subfolder called 'guaguas', my URL's are like this:

Code:
www.mysite.com/guaguas/controller/method

and in my config.php i have:

Code:
$config['base_url'] = 'http://www.mysite.com/guaguas/';
$config['index_page'] = '';
#4

[eluser]josepichu[/eluser]
Help please!
#5

[eluser]weboap[/eluser]
if your ci install is located physically in /guaguas/
mean
root/guaguas/index.php
root/guaguas/application
root/guaguas/system

use
Code:
RewriteBase /guaguas/

if /guaguas/ is a subfolder in your controller folder

like root/application/controllers/guaguas/

use
Code:
RewriteBase /

in both caese try the following .htaccess
and post back the result.
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /


RewriteRule ^$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)

RewriteRule ^(.*)$ index.php?/$1 [L]
#6

[eluser]josepichu[/eluser]
Ok!

it's work's

Thkns very much.




Theme © iAndrew 2016 - Forum software by © MyBB