KuMaR
KuMaR

Reputation: 213

Internal Server Error using WAMP server

I've created a MVC application using php, but when I try to access the urls it gives me "The server encountered an internal error"

When I check the log it gives me :

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] 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.

my .htaccess file Code:

Options-MultiViews
RewriteEngine On

RewriteBase/MVC/public

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


RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

Upvotes: 8

Views: 40116

Answers (4)

Anayat Naseri
Anayat Naseri

Reputation: 11

You can change it with:

  • Left click on wampsever

    Go to APACHE -> APACHE MODULES

    scroll down and find "rewrite_module"

    Then mark it check

Upvotes: 0

Omkar Ghurye
Omkar Ghurye

Reputation: 393

This problem is faced in Wampserver when the essential modules are not enable

You can Enable them with:

  • Left click on Wampsever icon

  • Go to APACHE -> APACHE MODULES

  • scroll down and find "rewrite_module" and "headers_module"

  • Then mark them check

It will restart automatically. Done.

enter image description here

Upvotes: 5

sunil
sunil

Reputation: 872

This problem comes due to wampserver using local.

You can change it with:

  • Left click on wampsever

  • Go to APACHE -> APACHE MODULES

  • scroll down and find "rewrite_module"

  • Then mark it check

It will restart automatically. All set.

Upvotes: 4

amit
amit

Reputation: 874

To enable mod_rewrite, went through the below steps:

1. Find and open the file .http.conf. This will be located in your Apache install folder.
2. Make a backup of http.conf which you can restore from, if anything were to go wrong
3. Find the line #LoadModule rewrite_module modules/mod_rewrite.so and remove the hash ‘#’
4. Locate the block within the directory tags as indicated below and change to:
<directory />
Options All
AllowOverride All
</directory>
5. Find any additional occurrences of the line “AllowOverride None” and change it to “AllowOverride All”.
6.Finally, restart apache server and your browser. The .htaccess rewriting should now be working for any local website.

Upvotes: 2

Related Questions