URL htaccess Error


#1

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


#2

Hi

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

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


#3

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.


closed #4

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