Frage

ich habe ein Problem CodeIgniter immer auf meinem Shared-Hosting-Konto zu arbeiten. Die URL ist http://test.tallgreentree.com . Es ist mir nicht .php Fehler geben, aber es ist eine 404-Seite für alles, was anzeigt ich in die Adressleiste eingeben.

Hier ist der Anfang meiner config.php.

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|   http://example.com/
|
*/
$config['base_url'] = "http://test.tallgreentree.com/";

/*
|--------------------------------------------------------------------------
| 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'] = "index.php";

/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'       Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'     Uses the REQUEST_URI
| 'ORIG_PATH_INFO'  Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol'] = "AUTO";

Gibt es bekannte Probleme bei CodeIgniter mit Sub-Domains verwenden? Was könnte die Ursache sein? Ich habe mehrere Konfigurationen ausprobiert, aber nichts scheint für mich zu arbeiten. Welche Server-Einstellungen soll ich überprüfen, mit meinem Hosting-Provider?

Vielen Dank für Ihre Zeit und Unterstützung zu erhalten.

War es hilfreich?

Lösung

Veränderung

$config['uri_protocol'] = "AUTO";

$config['uri_protocol'] = "REQUEST_URI"

und sehen, ob das behebt es

Auch Sie haben die Klasse Controllername der gleiche wie der Dateiname?

filename = test.php

class Test ...

Andere Tipps

Machen Sie 2 Änderungen in config.php

Das erste ist:

   `$config['uri_protocol'] = "AUTO";`

   `$config['uri_protocol'] = "REQUEST_URI"`

Zweite ist:

    $config['index_page'] = 'index.php';

    $config['index_page'] = 'index.php?';

Ich habe diese Arbeit mit „REQUEST_URI“ aber dann kann ich nur meine Homepage getroffen. Alle anderen Verbindungen (zur Steuerung) frischt immer auf die Startseite. Es ist irgendwie seltsam, dass es die richtige URL zeigt aber führt Sie auf die Homepage, egal welche URL Sie klicken.

Irgendwelche Ideen? Ich habe eine .htaccess-Datei,

RewriteEngine auf RewriteBase / testci RewriteCond% {REQUEST_URI} ^ System. * RewriteRule ^ (. ) $ /index.php/$1 [L] RewriteCond% {REQUEST_FILENAME}! -F RewriteCond% {REQUEST_FILENAME}! -D RewriteRule ^ (. ) $ index.php / $ 1 [L] RewriteCond $ 1 ^ (index.php | Bilder | captcha | css | js | robots.txt)! AddType text / css CSS

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top