英文:
Codeigniter 3 - when I click a link, it uses the full path
问题
I have a view file with the following link (actually, I have a lot but this is just one example):
echo anchor('Faq_public', 'Faq', array('class' => $faq_class));
When I hover over the link, I see what I expect, namely (bottom left hand corner of the browser gives me this):
But when I click it, it uses the full path, and some more, is displayed in the url box for some reason as follows
https://www.example.com/var/www/example.com/public_html/example.com/File_public
I don't have any idea how to correct this. Any advise on how to debug appreciated.
英文:
I have a view file with the following link (actually, I have a lot but this is just one example):
echo anchor('Faq_public', 'Faq', array('class' => $faq_class));
When I hover over the link, I see what I expect, namely (bottom left hand corner of the browser gives me this):
www.example.com/Faq_public
But when I click it, it uses the full path, and some more, is displayed in the url box for some reason as follows
https://www.example.com/var/www/example.com/public_html/example.com/File_public
I don't have any idea how to correct this. Any advise on how to debug appreciated.
答案1
得分: 1
将
$config['base_url'] = 'example.com';
替换为
$config['base_url'] = 'https://example.com/';
并检查是否适用于您。
英文:
Replace
$config['base_url'] = 'example.com';
With
$config['base_url'] = 'https://example.com/';
And check if it works for you
答案2
得分: 0
这是一个完全混乱的 .htaccess 问题。
英文:
It was a totally mixed up .htaccess problem
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论