我是新的web开发世界。我有一个网站托管。当我登录它应该带我到member_dashboard.php。它重定向到localhost上的此页面。如果我修改localhost路径,远程重定向会受到影响。我使用codeigniter作为框架。 base_url留空。我尝试设置基本URL与我的索引页的完整http路径仍然不能解决它。
I am new to the world of web development. I have a website hosted. When I login it should take me to "member_dashboard.php". It redirects to this page on localhost. If I modify the localhost path, the remote redirect gets affected. I am using codeigniter as the framework. "base_url" is left blank. I tried setting the base url with the full http path of my index page still cannot fix it.
$ config ['base_url'] = ';
推荐答案执行此更改
config / routes.php
$route['default_controller'] = "";//default controller name $route['404_override'] = '';在 config / config.php p>
In config/config.php
$config['base_url'] = ''; $config['index_page'] = '';在 config / autoload.php p>
In config/autoload.php
$autoload['helper'] = array('url');在 .htaccess c $ c> application 文件夹)
In .htaccess (Place outside application folder)
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>更多推荐
网页重定向到localhost
发布评论