Welcome Guest, Not a member yet? Register   Sign In
500 Internal server error when clicking links
#21

[eluser]d1a8lo24[/eluser]
Don't know if you have fix your problem but see if this helps. I know that there are a lot of .htaccess files out there but many standard hosting companies have the same setup and most of the time the following code will work try and see if it works.

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
    
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

I have been able to deploy my apps on godaddy and other hosting companies without any problems.

I hope it helps.
#22

[eluser]InsiteFX[/eluser]
Try this.

Place this code in your index.php file.
Code:
// by Phil Sturgeon
// Let's hold Windows' hand and set a include_path in case it forgot
set_include_path(dirname(__FILE__));

// Some hosts (was it GoDaddy? complained without this
@ini_set('cgi.fix_pathinfo', 0);

// PHP 5.3 will BITCH without this
if(ini_get('date.timezone') == '')
{
    date_default_timezone_set('GMT');
}

InsiteFX
#23

[eluser]keld[/eluser]
@d1a8lo24: IT's WOOORKIIIING!!!!
I feel like crying haha
Thanks so much! I'm gonna make 10 copies of this .htaccess file in case I lose it Smile
I think what makes it work is <IfModule mod_rewrite.c>

@InsiteFX: I didn't use your code since it is working now, but I'll keep it in mind in case I run into some troubles. Where would I put it, at the bottom of the file before it loads the bootstrap file?

Thanks so much guys, case closed Smile




Theme © iAndrew 2016 - Forum software by © MyBB