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?
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=
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER