Error installing script on localhost

Asked

Viewed 290 times

1

I am trying to install a script on local host, but the following error appears:

Internal Server Error

The server encountered an Internal error or misconfiguration and was Unable to complete your request.

Please contact the server Administrator at admin@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

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

I believe the error is caused by the file . htaccess, I just don’t know how to modify it.

.htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  • 1

    Try removing . htaccess to see if it works (back up first). You can cite the Apache error.log?

  • Yes, I have already deleted the . htaccess file, but the site gets unformatted and loses its functionality.

1 answer

2


I’ve had this problem, probably you’re using one of those programs that comes from PHP, Apache, Mysql together. How you are manipulating URL in your file type apache you must enable the rewrite module, which is located in:

You must locate the file httpd.conf from your Apache server, and search for the following line:

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the #, which means comments, that is, the line is commented; save the file and restart your server, probably the error Internal Server Error will cease to appear.

If you use WAMP like me, click on its icon in the tray, go to Apache, then in the file I said the name and make the previous described changes.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.