CodeIgniter Forums
Godaddy htaccess Internal Server Error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Godaddy htaccess Internal Server Error (/showthread.php?tid=40724)

Pages: 1 2


Godaddy htaccess Internal Server Error - El Forum - 04-16-2011

[eluser]onikage997[/eluser]
hi all,

On my previous hosting, my CI website was working fine with a htaccess of:
Code:
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


Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

[eluser]toopay[/eluser]
Try this.
Code:
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



Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

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

Where can I fix things for this 404? Routes.php?
Here's a sample route in my site:
Code:
$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..


Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

[eluser]toopay[/eluser]
Are you set config in './application/config/config.php' properly for remove index.php? And is it 404 apache or 404 CI?


Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

[eluser]onikage997[/eluser]
Its 404 CI.

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


Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

[eluser]toopay[/eluser]
Show your config on './application/config/config.php'.


Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

[eluser]onikage997[/eluser]
I haven't done any big changes here in config.php,
just this few lines below:
Code:
//$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/";
}



Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

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


Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

[eluser]onikage997[/eluser]
The design was to make
http://www.my-domain.com/index.php?/benefits/index/benefits-of-something.html
into
http://www.my-domain.com/benefits-of-something.html


Godaddy htaccess Internal Server Error - El Forum - 04-17-2011

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