ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Godaddy htaccess Internal Server Error

April 16, 2011 11:51pm

Subscribe [2]
  • #1 / Apr 16, 2011 11:51pm

    onikage997

    13 posts

    hi all,

    On my previous hosting, my CI website was working fine with a htaccess of:

    RewriteEngine on
    RewriteCond $1 !^(index\.php|/images|css|js|y_key_8cea22b21ebf57b1\.html|sitemap\.xml|robots\.txt|search-benefits-result\.html)
    RewriteRule ^(.*)$ index.php/$1 [L]

    Recently I transfered to goDaddy, and I’m having this Internval Server Error Problem.
    I’ve already tried some of their solutions like making the htaccess to 644 and also there are no error logs showing.
    I’ve also done adding RewriteBase / but it only produce “Oops! This link appears to be broken.” in Chrome and “No input file specified.” in Mozilla.

    can someone help me with this problem?

    Many Thanks

  • #2 / Apr 17, 2011 6:30am

    toopay

    1583 posts

    Try this.

    RewriteEngine On
    RewriteBase /
    RewriteCond $1 !^(index\.php|/images|css|js|y_key_8cea22b21ebf57b1\.html|sitemap\.xml|robots\.txt|search-benefits-result\.html)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*) index.php?/$1
  • #3 / Apr 17, 2011 7:01am

    onikage997

    13 posts

    @toopay

    hi, thanks for the reply. You partially fix the problem. Index is now ok with the images/css/ working ok , problems are the other page as it shows 404.
    Hey…, Atleast its 404 and not internal server error so.. 😊

    Where can I fix things for this 404? Routes.php?
    Here’s a sample route in my site:

    $route['benefits-of-.+.html'] = "benefits/title";
    $route['index.html'] = "benefits/index";
    $route['health-care-news/.+.html'] = "news/title";

    any suggestions?

    Many Thanks for the reply..

  • #4 / Apr 17, 2011 7:07am

    toopay

    1583 posts

    Are you set config in ‘./application/config/config.php’ properly for remove index.php? And is it 404 apache or 404 CI?

  • #5 / Apr 17, 2011 7:10am

    onikage997

    13 posts

    Its 404 CI.

    Actually I’ve changed the name and directory of my application folder but it was working in my previous hosting..

  • #6 / Apr 17, 2011 7:13am

    toopay

    1583 posts

    Show your config on ‘./application/config/config.php’.

  • #7 / Apr 17, 2011 7:21am

    onikage997

    13 posts

    I haven’t done any big changes here in config.php,
    just this few lines below:

    //$config['base_url']    = "http://www.my-domain.com/";
    if ($_SERVER['SERVER_NAME'] == 'localhost')
    {
        $config['base_url']    = "http://localhost/abc/";
    }
    else
    {
        $config['base_url']    = "http://www.my-domain.com/";
    }
  • #8 / Apr 17, 2011 7:31am

    toopay

    1583 posts

    Based by your routes config above, is there any different, between access ‘http://www.my-domain.com/benefits/title’ and ‘http://www.my-domain.com/index.php/benefits/title’ or ‘http://www.my-domain.com/index.php?/benefits/title’

  • #9 / Apr 17, 2011 7:39am

    onikage997

    13 posts

  • #10 / Apr 17, 2011 7:50am

    toopay

    1583 posts

    I know, how routes work. I just want to bypass it, for debug. I mean, lets access the original uri first, because i think routes is not an issue here. As you said above, index is ok, but another page generates CI 404, which mean something wrong, either in your config or .htaccess. What i mean, as i stated above, is there any different, between access ‘http://www.my-domain.com/benefits/title’ and ‘http://www.my-domain.com/index.php/benefits/title’ or ‘http://www.my-domain.com/index.php?/benefits/title’ at your browser. Are they generates same result?

  • #11 / Apr 17, 2011 8:00am

    onikage997

    13 posts

    These two shows 404 CI:
    ‘http://www.my-domain.com/benefits/title’ and
    ‘http://www.my-domain.com/index.php?/benefits/title’

    This one shows No input file specified.
    ‘http://www.my-domain.com/index.php/benefits/title’

  • #12 / Apr 17, 2011 8:38am

    toopay

    1583 posts

    try replace LAST line, in .htaccess with this

    RewriteRule ^.*$ index.php/$1 [L]
  • #13 / Apr 17, 2011 8:43am

    onikage997

    13 posts

    done,.. its not 404 now but everywhere I go the content showing up is from my index..

  • #14 / Apr 17, 2011 9:24am

    onikage997

    13 posts

    after a few debugs, I found something weird in my Model:

    function get_byTopicTitle()
        {
            if($this->uri->segment(1) == "")
            {
                $this->db->where('topicURLTitle', "index.html");
            }
            else
            {
                $this->db->where('topicURLTitle', $this->uri->segment(1));
            }
            $this->db->limit(1);
    
            $query = $this->db->get('tbltopics');
            //return $query->result();
            return $query;
        }

    The $this->uri->segment(1); is not returning anything even though the URL is http://www.my-domain.com/benefits-of-something.html
    It suppose to return “benefits-of-something.html” but it didn’t so it always show my index page..

    It seems that $_SERVER[‘ORIG_PATH_INFO’] is not working in goDaddy and $_SERVER[‘PATH_INFO’] only returns /

    Any ideas?

    Many Thanks..

  • #15 / Apr 17, 2011 1:55pm

    toopay

    1583 posts

    in config.php under ‘application/config’, change auto to path info

    //$config['uri_protocol']    = 'AUTO';
    $config['uri_protocol']    = 'PATH_INFO';
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases