My oroginal url looks like this
http://www.example.com/showads.php?type=1
And this rewrite seems to work
RewriteRule ^listings/type/([0-9]+)/?$ showads.php?adtype=$1 [NC,L]
So that all I have to do is type www.example.com/listings/type/1 and it goes to the original url
My problems comes when I add one more parameter to the original url like this
http://www.example.com/showads.php?type=1&clearfilters
I have tried several combinations of rewrites but none of them work.
The last one I have before giving up was this
RewriteRule ^listings/type/([0-9]+)/clear?$ showads.php?type=$1&clearfilters [NC,L]
What am I doing wrong? in that last rewrite? Your help is appreciated.
Thanks
JT
Better Explanation
Thanks for the reply. However,that still does not work.
Let me try to explain what happens
If I were to type this url
http://www.example.com/showads.php?adtype=3&clearfilters
I get the expected results. And here is an explanation of it's use
A user clicks on various links on the site and each link sets a different session variable. Over the span of a few clicks there could be 5 or 6 session variables set.
If one was to submit this url without the clearfilters
http://www.example.com/showads.php?adtype=3
You would be setting a session variable for adtype to 3
So now we would have the adtype session variable and possibly a few other set
When you submit this url with the clearfilters set
http://www.example.com/showads.php?adtype=3&clearfilters
The page unsets all the existing session variables and sets only the adtype session to 3.
Having said that, I am looking for a rule where i could just clean up the url and type something like:
http://www.example.com/listings/type/3/clear
to do the same as the ugly url.
Maybe there is a better way. I am all ears.
Thanks
JT