簡體   English   中英

無法在 php codeigniter 中設置初始頁面

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM