Welcome Guest, Not a member yet? Register   Sign In
Godaddy htaccess Internal Server Error
#11

[eluser]onikage997[/eluser]
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

[eluser]toopay[/eluser]
try replace LAST line, in .htaccess with this
Code:
RewriteRule ^.*$ index.php/$1 [L]
#13

[eluser]onikage997[/eluser]
done,.. its not 404 now but everywhere I go the content showing up is from my index..
#14

[eluser]onikage997[/eluser]
after a few debugs, I found something weird in my Model:
Code:
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

[eluser]toopay[/eluser]
in config.php under 'application/config', change auto to path info
Code:
//$config['uri_protocol']    = 'AUTO';
$config['uri_protocol']    = 'PATH_INFO';
#16

[eluser]onikage997[/eluser]
hi toopay,

Is you code above the ideal thing to do because I think it is..

The problem was fix yesterday but I think my fix was kinda bad for the core URI.php
I added this block of code in URI.php
Code:
//onikage997: For Previous Hoting. Adding $_SERVER['ORIG_PATH_INFO'] if PATH_INFO won't work and the above code provided by CI don't work
$path = (isset($_SERVER['ORIG_PATH_INFO'])) ? $_SERVER['ORIG_PATH_INFO'] : @getenv('ORIG_PATH_INFO');
if (trim($path, '/') != '' && $path != "/".SELF)
{
  $this->uri_string = $path;
  return;
}
            
//onikage997: For goDaddy. Solves can't find ORIG_PATH_INFO and PATH_INFO
if ($_SERVER['SERVER_NAME'] != 'localhost')
{
  $path = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : '';
  if (trim($path, '/') != '' && $path != "/".SELF)
  {
    $this->uri_string = $path;
    return;
  }
}

Many Thanks
#17

[eluser]toopay[/eluser]
Pff. GoDaddy Suck! :coolmad:

Based by your "hardcore" fixing above, setting up config will be useless. I only suggest you, to create a pre-system hook instead "hacking" CI Core like you did above.
#18

[eluser]onikage997[/eluser]
yeah.. I know hook would be the right thing to do.
But about goDaddy, why? can you suggest other hosting that would be better?

Anyways thanks for fixes and suggestion.
#19

[eluser]toopay[/eluser]
No problems. About hosting company, if you used CI in every project, consider use this ones.




Theme © iAndrew 2016 - Forum software by © MyBB