【问题标题】:how to fix "Error Connection Timed Out Error" of a codeigniter website on a godaddy server?如何修复godaddy服务器上codeigniter网站的“错误连接超时错误”?
【发布时间】:2019-01-02 09:59:00
【问题描述】:

我在 godaddy 服务器上上传了一个基本的 codeigniter 网站,没有任何数据库连接。在配置文件中,base url 设置为域名,index_page 为空白,uri_protocol 设置为 request_uri。我也有带有代码的 .htaccess 文件,但不确定在其中做什么。这里我应该怎么做才能消除这个错误?

我尝试过使用基本 url 和 uri_protocol,还对 .htaccess 文件进行了更改,但也没有帮助。

我的 .htaccess 代码 -

Options +FollowSymLinks
RewriteEngine on

# Send request via index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

【问题讨论】:

  • 给我域名。
  • 试试这个,RewriteBase 上的 RewriteEngine / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(index\.php|css|woff|eot|ttf|svg |css|js|资源|机器人\.txt)
  • 我尝试使用此代码,但它说“连接超时”并且在本地主机中它给了我一个内部错误..
  • 我发现该域指向不同的服务器,所以已经更新它会在激活后检查您的代码谢谢!

标签: php codeigniter-3


【解决方案1】:

让你的/folder/app/.htaccess 像这样:

<IfModule mod_rewrite.c>    
    RewriteEngine on    
    RewriteBase /folder/app/    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]    
</IfModule>

那么在/folder/app/application/config/config.php你需要有这个配置:

$config['base_url']  = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';

【讨论】:

    猜你喜欢
    • 2020-10-18
    • 1970-01-01
    • 2022-06-28
    • 2019-12-03
    • 1970-01-01
    • 2019-06-25
    • 1970-01-01
    • 1970-01-01
    • 2017-02-07
    相关资源
    最近更新 更多