Unable to access codeigniter controller in Live Server but accessible in localhost (xampp on windows)

可紊 提交于 2019-12-23 15:53:34

问题


My project working fine on local system (XAMPP) , however when uploaded to hosting server its not working. Im Using Codeigniter framework. accesible in localhost via "localhost/myproject/controller" , but in host server unable to access via myproject.com/controller or even myproject.com/index.php/controller !!

On server, main domain is (lets suppose D.COM and add on domain is AD.COM). My application is installed under addon domain. hence my folder structure is

public html/
            AD.COM/
                  application/
                              Config
                              Controllers
                              Modules
                              Views
                  System/
                 User_guide/
                .htaccess

.htaccess contains this code

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]

Also maintained these variables

$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

how to fix this. I tried googling but didnt get any help. Thanks in advance.


回答1:


Please be concern about Codeigniter naming conversion and Keep mind Linux host is Case-Sensitive.

You are not providing any resources related to your question. So have to tell is check about Spellings of your url and controller names and methods which you will call further.



来源:https://stackoverflow.com/questions/32714538/unable-to-access-codeigniter-controller-in-live-server-but-accessible-in-localho

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!