php - Internal Server Error: Having trouble with mod_rewrite in .htaccess
My URL is like this:
http://example.com/Folder/index.php?city=Berlin&id=1
I want to turn it into:
http://example.com/Berlin/1
Using Generate It! I get this code:
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /Folder/index.php?city=$1&id=$2 [L]
But when adding this in my .htaccess file and trying to openhttp://example.com/Berlin/1
I'm getting 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, [no address given] 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.
Apache/2.2.14 (Ubuntu) Server at example.com Port 80
What am I doing wrong? I'm trying since hours to get it work, but without success.
Answer
Solution:
I found the solution:
I'm using this in my
.htaccess
:to change this link:
to: