CodeIgniter Forums

Full Version: internal server error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

im using xampp server at home and i can execute the files without any problem..but the same folder if i put in wamp server in my office its showing the following error,
Internal Server Error

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

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

if i remove the htaccess file im getting different error as follows,
Parse error: syntax error, unexpected $end in C:\wamp\www\weldingnew\system\application\views\header.php on line 33

can some one please tmme what exactly i need to do.

Thanks & regards,

El Forum

[eluser]GSV Sleeper Service[/eluser]
check your apache error logs, the 500 internal server error is probably being caused by a problem with mod_rewrite, the apache error log should give you more details about the error. I'm not sure about the 'unexpected $end', not without seeing some code.

El Forum

The internal server error is certainly something related to your htaccess file - a few things to check would be the rewrite_base and any rewrite rules. Post your htaccess file on here and might be able to work it out.

As for the other error it seems the code is being executed all ok - just that you have an error in your header view - most likely a missing bracket for an if statement or similar.

El Forum

here by im sending my htaccess file ...plzz go thru it and give me the solution.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^(index\.php|check_images|js|css)
RewriteRule ^(.*)$ index.php/$1 [L]

Thanks & Regards,

El Forum

There isn't anything obvious I can see in there, my next thought is that you might need to set a RewriteBase for the file and place it at the top eg.

RewriteBase /www/weldingnew/

Play around with a few different directory listings and you might hit a right one Tongue

El Forum

RewriteCond %{REQUEST_URI} !^(index\.php|check_images|js|css)

This line is probaly what's causing your problem.

Really, it only needs to be:

RewriteCond %{REQUEST_URI} !^(index\.php)

Which means that if "index.php" is not the first part of the URI, it's automatically added.
The two line above should handle everything else. If you supply the URI of, as long as the first part of the URI is a valid directory ( and actually exists in your server route, then it should work as expected. If it's not in your server root, then you will need to use BaseRewrite to rewrite the base path.

Hope this helps.

If you are still having problems, please zip the .htaccess file, and attach it to your next post so we can see it.