URL htaccess Error

I have a url like

http://anplay.gq/genres?Genre=Adventure

How do I hide the id part by using htaccess and just show:

http://anplay.gq/genres/Adventure

But When I Try By Edit .htaccess

RewriteEngine on
RewriteRule ^genres/(.*)?$ /genres.php?Genre=$1

Always Host Redirect 500 Internal Server Error

Give Me answer as soon as possible Preformatted text

Hi

for me it is normal to have it in the search query :slight_smile:

https://stackoverflow.com/questions/4270677/removing-query-string-in-php-sometimes-based-on-referrer

https://secure.php.net/manual/en/function.parse-url.php

I haven’t tested this, but I suspect this line should be:

RewriteRule ^/genres/(.+)$ /genres.php?Genre=$1

This way, it should only redirect if a genre is actually provided.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.