Codeigniter base_url in plesk

时间:2018-05-29 11:09:28

标签: php codeigniter plesk base-url

最近我上传了一个使用codeigniter框架创建的网站到plesk。在c-panal中,我将文档根目录更改为httpdocs / public_html / cliftonhotel.ae,然后使用FTP将文件上传到相同的文件中。我将base_url更改为

$config['base_url'] = 'http://cliftonhotel.ae/';

问题是如果我输入网址它加载正常(主页),但其他菜单不起作用,它们显示404页面未找到错误。

[http://cliftonhotel.ae/][1] 这是网站。什么是解决方案,谢谢你。

2 个答案:

答案 0 :(得分:1)

做一些改变,希望它能起作用 // .htaccess文件

    RewriteEngine on
    RewriteCond $1 !^(index\.php|public|\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?$1

// config.php

    $config['index_page'] = ' ';

答案 1 :(得分:0)

您创建的链接似乎缺少index.php

例如:http://cliftonhotel.ae/index.php/home/about有效

http://cliftonhotel.ae/home/about没有。

因此,您必须更改链接或编辑.htaccess以进行网址重写