Link to home
Start Free TrialLog in
Avatar of poemorella
poemorella

asked on

Htaccess does not redirect dynamic part in url

I'm trying to redirect the following url:
http://mydomain.com/samples_gallery.php?browse_by=subject&detail=11 to this one:
http://mydomain.com/gallery/subject/babies-kids

With the following code:
RewriteRule ^samples_gallery.php$ /gallery/subject [L,R=301]
RewriteCond %{QUERY_STRING} ^browse_by=subject&detail=11$

However, when done, I get the following url in response:
http://mydomain.com/gallery/subject/babies-kids?browse_by=subject&detail=11

How to I make the condition to eliminate the dynamic part?
ASKER CERTIFIED SOLUTION
Avatar of rjdown
rjdown
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of poemorella
poemorella

ASKER

That worked great. Many thanks.