Welcome Guest, Not a member yet? Register   Sign In
500 Internal Server Error
#1

[eluser]rash[/eluser]
Hello all,

There is a problem in site

Code:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator and inform them of the time the error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
Apache Server at gyanprakashelearning.com Port 80

My project is in mvc format. After getting this error i am checking my .htaccess file where the code is:

Code:
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
I am not getting that where i am wrong, can anyone solve this error...and help me.....

Thanks in advance
#2

[eluser]InsiteFX[/eluser]
Try this one:

Code:
<IfModule mod_rewrite.c>

# pass the default character set
AddDefaultCharset utf-8

    # Make sure directory listing is disabled
Options +FollowSymLinks -Indexes
RewriteEngine on

# NOTICE: If you get a 404 play with combinations of the following commented out lines
#AllowOverride All
RewriteBase /

# Restrict your site to only one domain
# !important USE ONLY ONE OPTION

# Option 1: To rewrite "www.domain.com -> domain.com" uncomment the following lines.
#RewriteCond %{HTTPS} !=on
#RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

# Option 2: To rewrite "domain.com -> www.domain.com" uncomment the following lines.
#RewriteCond %{HTTPS} !=on
#RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
#RewriteCond %{HTTP_HOST} (.+)$ [NC]
#RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

# Remove index.php from URL
RewriteCond %{HTTP:X-Requested-With} !^XMLHttpRequest$
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteRule ^index\.php(.*)$ $1 [R=301,NS,L]

# Send request via index.php (again, not if its a real file or folder)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# deal with php5-cgi first
<IfModule mod_fcgid.c>
  RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

<IfModule !mod_fcgid.c>

  # for normal Apache installations
  <IfModule mod_php5.c>
   RewriteRule ^(.*)$ index.php/$1 [QSA,L]
  </IfModule>

  # for Apache FGCI installations
  <IfModule !mod_php5.c>
   RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
  </IfModule>

</IfModule>

</IfModule>
#3

[eluser]CroNiX[/eluser]
What are you trying to accomplish with this?
Code:
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

That isn't a URL that CI would understand. It doesn't use query strings by default, and if you do enable them the best I can tell that is not the correct format it expects. (?url=xyz)

From /application/config/config.php
Code:
/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| example.com/who/what/where/
|
| By default CodeIgniter enables access to the $_GET array.  If for some
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
| You can optionally enable standard query string based URLs:
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The other items let you set the query string 'words' that will
| invoke your controllers and its functions:
| example.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['allow_get_array']  = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger']  = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
#4

[eluser]rash[/eluser]
Hello PM InsiteFX,

I am trying your code in htaccess file, in Firefox browser it shows:

Code:
The page isn;t redirect properly

And in Chrome browser it shows:

Code:
This webpage has a redirect loop

I am not getting why this come. need any change in your code????


#5

[eluser]rash[/eluser]
Hello PM CroNiX

After adding your code in htaccess file the same result displayed...
Please give me some other way....

Thanks
#6

[eluser]InsiteFX[/eluser]
Then you have something else wrong in your code, because I use that .htaccess file all the time with no problems.

The .htaccess file is from FuelPHP and I use it for both FuelPHP and CodeIgniter because it works.

Check your base_url etc in ./application/config.php

#7

[eluser]rash[/eluser]
Hello PM InsiteFX

But i am not getting that where i m wrong....
in my config file the code is;

Code:
&lt;?php
error_reporting(0);

define('LIBS', 'libs/');

//online file path
define('URL', 'http://gyanprakashelearning.com/');
//online database details
define('DB_TYPE', 'mysql');
define('DB_HOST', 'localhost');
define('DB_NAME', 'gyanprakash');
define('DB_USER', 'gyanprakash');
define('DB_PASS', 'GyanDATA@143');

}

These codes are written then where i am wrong???...please tell me..
#8

[eluser]rash[/eluser]
Which module are supported to mvc format...
My server is not CGI-Module...is there some problem for this...

plz somebody help me..
#9

[eluser]InsiteFX[/eluser]
Are you sure that your server is running php5 ?

If Chrome is saying that this page has a redirect loop then you probably do check your code, I use Chrome and all the other browsers for testing.
#10

[eluser]rash[/eluser]
Hello PM InsiteFX

Yes i am working on php5.
You can check also Legit site

my config file is k, my controller is k, then where is the problem...

i have no knowledge in .htaccess. please give some idea to save from the error.




Theme © iAndrew 2016 - Forum software by © MyBB