1
votes

I'm trying to create .htaccess file

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$index.php?url=$1 [QSA,L]

And when I try in web browser localhost/mvc (mvc is my web directory) I'm getting error

Internal Server Error:

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

Please contact the server administrator at Webmaster@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.

Apache/2.4.6 (Ubuntu) Server at local host Port 80

1
Is rewrite module enabled?Adam Azad
yes, rewrite module is enabledArif Nur Rohman
Check your Apache error logs. My guess is you're missing the FileInfo overridePhil
You're also missing a space after ^(.+)$Jon Lin

1 Answers

0
votes

Set AllowOverride to All in your httpd.conf