plesk 中的 Codeigniter base_url

Codeigniter base_url in plesk

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

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

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

[http://cliftonhotel.ae/][1] 这是网站。有什么办法,谢谢。

您创建的链接似乎丢失了index.php

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

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

因此您必须更改链接或编辑您的 .htaccess 以 url 重写

做一些改变,希望能奏效 // .htaccess 文件

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

// config.php

    $config['index_page'] = ' ';