Welcome Guest, Not a member yet? Register   Sign In
Hostgator routing issue - not solved by REQUEST_URI
#1

[eluser]gypmaster[/eluser]
Hi,

I'm trying a ci install on my hostgator hosting but keep having 404 not found issues. I've searched the forums and gound the stuff about changing the
Code:
$config['uri_protocol']    = "AUTO";
to
Code:
$config['uri_protocol']    = "REQUEST_URI";

still no help though.

Everything sits in a folder called ci on my webhost.

when I type http:www.mydomain.com/ci/ I get the hostgator 404 not found page.

when I type http:www.mydomain.com/ci/index.php I get the ci Page Not found error.

base url is set to
Code:
$config['base_url']    = "http:www.mydomain.com/ci/";

.htaccess is as follows:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

anyone know what I'm doing wrong?

P.S. hostgator say they have

AllowOverride All

set by default for Apache config.
#2

[eluser]tomcode[/eluser]
Maybe You need to set the rewrite base

Code:
RewriteBase /ci/


You may also try to put a ? after index.php :

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

[eluser]jdfwarrior[/eluser]
[quote author="gypmaster" date="1250550106"]Hi,

I'm trying a ci install on my hostgator hosting but keep having 404 not found issues. I've searched the forums and gound the stuff about changing the
Code:
$config['uri_protocol']    = "AUTO";
to
Code:
$config['uri_protocol']    = "REQUEST_URI";

still no help though.

Everything sits in a folder called ci on my webhost.

when I type http:www.mydomain.com/ci/ I get the hostgator 404 not found page.

when I type http:www.mydomain.com/ci/index.php I get the ci Page Not found error.

base url is set to
Code:
$config['base_url']    = "http:www.mydomain.com/ci/";

.htaccess is as follows:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

anyone know what I'm doing wrong?

P.S. hostgator say they have

AllowOverride All

set by default for Apache config.[/quote]

You should have no issues just installing CI on Hostgator as I have hosted multiple sites on Hostgator. I just moved system back, outside of the web root, adjust index.php path to reflect that, and kept my app folder in the web root, along with public. Then added htaccess. Mine is a little different..

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?$1 [L,QSA]

Don't know if that is the cause though
#4

[eluser]gypmaster[/eluser]
[quote author="tomcode" date="1250553214"]Maybe You need to set the rewrite base

Code:
RewriteBase /ci/


You may also try to put a ? after index.php :

Code:
RewriteRule ^(.*)$ index.php?/$1 [L]
[/quote]

Tried that, no luck though ... same stuff is happening.

Also tried the following ... no luck there either..
Quote:RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
#5

[eluser]jdfwarrior[/eluser]
Did you ever verify that a base installation works? Just copying system folder and index.php over to hostgator and browsing to the site to see if you get the default installation page?
#6

[eluser]gypmaster[/eluser]
[quote author="jdfwarrior" date="1250555428"]Did you ever verify that a base installation works? Just copying system folder and index.php over to hostgator and browsing to the site to see if you get the default installation page?[/quote]

Tried that too but when typing in www.mydomain.com I get Internal Server Error

when typing in www.mydomain.com/index.php I get the default controller index function ... which is good but when I click on a link I get the Internal Server Error message.
#7

[eluser]jdfwarrior[/eluser]
Did you make any kind of config changes or add routes or anything? I just removed all the stuff I had on one of my domains, then uploaded CodeIgniter, untouched from the zip file.. and it works..
#8

[eluser]gypmaster[/eluser]
I'll try to start again from scratch ... clear everything as you did and see how it goes.

Thanks for helping.
#9

[eluser]Najeeb[/eluser]
hello there,

I'm new to CodeIgniter and PHP, am using codeigniter 2.0 and php 5 to develop my first web site, everything is going graet on my localhost, U have uploaded the files to my hostgator hosting, i get the same error as in this post, i have tryed this solution, nothing goes will, always i get codegniter 404.
Is there any asides .. help Please ..
thanks in advance,
Najeeb.

#10

[eluser]freeman[/eluser]
Can you post your htaccess please?

Perhaps uploading a test.php and running it? If that still show error 500 then it's not on the CI installation.

$config['uri_protocol'] = "AUTO" works fine for me too




Theme © iAndrew 2016 - Forum software by © MyBB