php - Internal Server Error: Having trouble with mod_rewrite in .htaccess


My URL is like this:

I want to turn it into:

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 open 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 Port 80

What am I doing wrong? I'm trying since hours to get it work, but without success.




I found the solution:

I'm using this in my.htaccess:

RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)/id/([^/]*)$ /Folder/index.php?city=$1&title=$2&id=$3 [L]

to change this link:


People are also looking for solutions to the problem: php - Canit insert into my MYSQL table


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.