[英]Unable to set a initial page in php codeigniter
I'm new in php codeigniter, i need to modify a project but i cant set the base url it redirects me to an external url and i can't edit anything in the project.
例如,如果我输入项目路径,它会将我重定向到“https://test.com”
我将 application/config 中的基础 url 设置为 localhost。 但它不起作用。 这是我的基地 url
$config['base_url'] = 'localhost/';
我不知道还有什么可能导致这个问题我很沮丧
任何想法或解决方案将不胜感激。
祝你有美好的一天
我猜,当你尝试下面你总是得到值https://test.com ? 如果它在某处被覆盖,您可以在项目文件夹中搜索该值。
<?php echo base_url(); ?>
尝试检查.htaccess
文件项目下的 .htaccess 文件,也许您的.htaccess
设置 Z572D4E421E5E6B9BC12ZE8A27 如下:
RewriteRule ^(.*)$ https://test.com/$1 [R,L]
将其更改为
RewriteRule ^(.*)$ https://localhost/yourfilename/$1 [R,L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.