Welcome Guest, Not a member yet? Register   Sign In
went live - links not working anymore - please help
#1

[eluser]heymike[/eluser]
Hello,

I've been working on a site for the past while and it has been working great on my localhost.

After going live (the goal is to get this issue fixed, then password protect the site while our translaters review it and I make a few final adjustments).

The home page loads fine, but none of the other links are working. It loads the css files and images fine, but can't find any controllers that I try to call.

Here is a portion of the config file (i'm assuming this is where the problem is) as well as the routes.php file.

if you need any other code let me know. the site can be viewed at www.eglisedieuvivant.org

any help is greatly appreciated


config

if ($_SERVER['SERVER_NAME'] == 'localhost')
{
$config['base_url'] = "http://localhost/eglisedieuvivant/";
define('ABS_URL','/eglisedieuvivant/');
}
else
{
$config['base_url'] = "http://www.eglisedieuvivant.org/";
define('ABS_URL','http://www.eglisedieuvivant.org/');
}
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = "";

routes

| This route lets you set a "secret" word that will trigger the
| scaffolding feature for added security. Note: Scaffolding must be
| enabled in the controller in which you intend to use it. The reserved
| routes must come before any wildcard or regular expression routes.
|
*/

$route['default_controller'] = "home";
$route['scaffolding_trigger'] = "";
#2

[eluser]Jamie Rumbelow[/eluser]
Are you using a .htaccess file to remove the index.php from the URL? If so, make sure it copied over properly.

Jamie
#3

[eluser]theprodigy[/eluser]
you may want to check the URI_PROTOCOL in your config.php file. My hoster didn't like it when I had it on auto. I had to go through each one to find out which ones worked.
#4

[eluser]heymike[/eluser]
just double checked that and it did copy over correctly. Called the server admin and the log is showing a 404 error from it. So it is redirecting, just not ending up pointing to a file

RewriteEngine on

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

[eluser]theprodigy[/eluser]
I'm not exactly sure it's a htaccess issue, because I can't even get it to work with index.php in the url. (http://www.eglisedieuvivant.org/index.ph...mmentaires does not work)
if htaccess was the issue, using index.php should work, but it's not.
#6

[eluser]heymike[/eluser]
tried all the URI_PROTOCOL settings to no avail.

if it isn't a .htaccess problem do you have any other suggestions?

my controllers are all located in eglisedieuvivant.org/system/application/controllers

my urlsuffix in config.php is set to ""

rewrite_short_tags is set to true


here is a portion of my index.php file found at eglisedieuvivant.org/index.php

|---------------------------------------------------------------
| SYSTEM FOLDER NAME
|---------------------------------------------------------------
|
| This variable must contain the name of your "system" folder.
| Include the path if the folder is not in the same directory
| as this file.
|
| NO TRAILING SLASH!
|
*/
$system_folder = "system";

/*
|---------------------------------------------------------------
| APPLICATION FOLDER NAME
|---------------------------------------------------------------
|
| If you want this front controller to use a different "application"
| folder then the default one you can set its name here. The folder
| can also be renamed or relocated anywhere on your server.
| For more info please see the user guide:
| http://ellislab.com/codeigniter/user-gui..._apps.html
|
|
| NO TRAILING SLASH!
|
*/
$application_folder = "application";

/*
|===============================================================
| END OF USER CONFIGURABLE SETTINGS
|===============================================================
*/



/*
|---------------------------------------------------------------
| SET THE SERVER PATH
|---------------------------------------------------------------
|
| Let's attempt to determine the full-server path to the "system"
| folder in order to reduce the possibility of path problems.
| Note: We only attempt this if the user hasn't specified a
| full server path.
|
*/
if (strpos($system_folder, '/') === FALSE)
{
if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
{
$system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
}
}
else
{
// Swap directory separators to Unix style for consistency
$system_folder = str_replace("\\", "/", $system_folder);
}
#7

[eluser]heymike[/eluser]
should my application folder be placed somewhere other than in the system folder?
#8

[eluser]theprodigy[/eluser]
you can place your application folder wherever you like as long as you update index.php to the correct path.

Some people stick with the default layout.
Some pull application outside of system.
I tend to pull application out of system (so they are sibling directories), and then pull the entire directory structure outside of webroot, leaving only index.php and asset folders (css, js, images) inside of web root, then update index.php to point to the application and system directories.

As long as index.php knows where the folders are at, you should be able to put them wherever you like.
#9

[eluser]heymike[/eluser]
ok, so that shouldn't be the problem then.

I've tried changing my default controller, and I have been able to do that. So for some reason it can find the default controller, but can't find any of the other controllers
#10

[eluser]BrianDHall[/eluser]
If it can find the default controller but nothing else, then to me that sounds like routes is the next place to look. You could possibly have a route defined that is grabbing more than you expect and sending it places you don't want it to go.

So check and/or post the routes you have defined, and then check your project and be careful of any use of remap() functionality, very easy to throw 404s if you aren't careful with those.

Also I'd go ahead and delete .htaccess from the server and change your config file to use index.php. This narrows down what could be going wrong so it should be easier to get it working and then work your way back to removing the index file.




Theme © iAndrew 2016 - Forum software by © MyBB