网页重定向到localhost

编程入门 行业动态 更新时间:2024-10-22 19:32:02
本文介绍了网页重定向到localhost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是新的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

本文发布于:2023-10-12 16:56:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1485315.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重定向   网页   localhost

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!