2016-04-26 3 views
0

Mein Codeigniter Projekt funktionierte gut in localhost (i Linux Cpanel bin mit)Mein codeiginter Projekt nicht ohne index.php arbeitete in Online

https://localhost/project/profile

Aber ohne index.php in Verbindung funktioniert es nicht mehr online

https://domainname.in/index.php/profile

.htaccess-Datei

RewriteEngine on 
RewriteCond $1 !^(index\.php|resources|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

und meine route.php Datei

$route['default_controller'] = "pages/home"; 
$route['404_override'] = ''; 
$route['pages/profile'] = "pages/profile"; 
$route['creators'] = "pages/userList"; 
$route['auth/logout'] = "auth/logout"; 
$route['auth'] = "auth/logout"; 
$route['auth/login'] = "auth/login"; 
$route['auth/register'] = "auth/register"; 
$route['pages/post'] = "pages/post"; 
$route[$username.'/about'] = "pages/menus/about"; 
$route[$username.'/credibility'] = "pages/menus/credibility"; 
$route[$username.'/release'] = "pages/menus/release"; 
$route[$username.'/jobs'] = "pages/menus/jobs"; 
$route[$username] = "pages/userList/userview/$1"; 
+0

Mögliche Duplikat [Codeiginter Produkt funktionierte gut in local ohne index.php aber nicht in Server gearbeitet] (http://stackoverflow.com/questions/36906066/codeiginter-product-worked-well-in-localserver -ohne-index-php-but-not-worked) – shruthi

Antwort

0

bitte mit diesem versuchen. Hoffentlich wird es funktionieren.

Update mit Ihrem Root .htaccess.txt

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .* index.php/$0 [PT,L] 
Options All -Indexes 
+0

und in meinem Linux-Panel zeigt nicht .htaccess-Datei. Wie zu sehen und zu bearbeiten .. – shruthi

+0

Wo die Htaccess-Dateien im Hauptordner oder Anwendungsordner – shruthi

+0

platzieren, hat nichts funktioniert, – shruthi

0

erstellen .htaccess-Datei in Ihrem Projektordner-Datei Ich hoffe, es funktioniert.

RewriteEngine on 
RewriteBase /projectfoldername/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond $1 !^(index\.php|js|img|css|captcha|robots\.txt) 
RewriteRule ^(.*)$ /projectfoldername/index.php/$1 [L] 
Verwandte Themen