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]
It says that whatever port is used by Apache (Wamp server) is currently used by some other service, so if you want to start the Apache service then you have to changethe port of this Wampserver service. Now for changing the port you have to go to Wampserver menu => Apache. Open httpd. conf file.
The 500 Internal Server error could be caused by an error during the execution of any policy within Edge or by an error on the target/backend server. The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request.
Contact the web hosting provider Ultimately, the “500 Internal Server Error” may not be caused by your website configuration. The MySQL server may be down, or the server may be overloaded. Contact your web hosting's support team so they can check the server's status and help further with the problem.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With