Welcome Guest, Not a member yet? Register   Sign In
Only loading index page
#1

[eluser]TerryE[/eluser]
I have a folder in my main directory named ibewAdmin (ibew.org/ibewAdmin). this folder contains my admin area in which I used codeigniter. Now my main site is not with codeigniter. when I tested it on my local server it works but when I uploaded it to my server only the index page loads. I keep getting page not found. I am not using an .htaccess at all. But I did try it and it removes the index.php but still get the error page not found. Any ideas on what to try?

#2

[eluser]jonez[/eluser]
You need an .htaccess file next to the root index.php of CI (/ibewAmin/.htaccess).

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

What this does is take the requested URL and passes it to the root index.php as a parameter. CI maps the path segments to your controllers, if it can't find a match it throws a 404.
#3

[eluser]TerryE[/eluser]
I tried what you posted but still does not work. Also tried changing

Code:
$config['uri_protocol']= 'AUTO';

and this sometimes I will just get the same page back with out the "page not found"
#4

[eluser]jonez[/eluser]
Have you set $config['base_url'] to include ibewAdmin?
#5

[eluser]TerryE[/eluser]
Yes tried just about every thing. Searched the web and tried all the answers I found and still no luck
#6

[eluser]jonez[/eluser]
Can you confirm your .htaccess is working? Put a redirect in it and see if that works. Depending on how your host is setup it may not be using it. The full file should be something like this:

Code:
RewriteEngine On
RewriteBase /

# or maybe this
# RewriteBase /ibewAdmin/

# does this work?
# RewriteRule ^(.*)$ http://newdomain.com/ [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
#7

[eluser]TerryE[/eluser]
Just tried what you posted and it it working, it did the redirect
#8

[eluser]TerryE[/eluser]
Well I found out what the problem was. The anchor tag in my view was Login/validate_user. For some reason when I tested it live the capital "L" in Login was causing the problem. Not sure if it is a codeigniter thing or a url problem using capitals. But I would like to thank you for your help.
#9

[eluser]Tpojka[/eluser]
This article could explaing that situation, probably.
#10

[eluser]jonez[/eluser]
[quote author="TerryE" date="1388969986"]Well I found out what the problem was. The anchor tag in my view was Login/validate_user. For some reason when I tested it live the capital "L" in Login was causing the problem. Not sure if it is a codeigniter thing or a url problem using capitals. But I would like to thank you for your help.[/quote]
It's an OS thing. Some (Linux, Mac) are case sensitive where Windows will usually let you do both.




Theme © iAndrew 2016 - Forum software by © MyBB