Hi SethsdadtheLinuxer
Thanks for you reply but that doesn't work.
After few more hours I finaly found the solution
and here it is:
Code:
RewriteCond %{QUERY_STRING} ^frameA\=zip\/[a-z]\/(.*)$
RewriteRule ^index\.html(.*)$ /index.php?search=%1 [L]
I explain
Here is how my original URL look like:
http://www.mysite.com/index.html?fra...p/f/myfile.zip
and I wanted it to become:
http://www.mysite.com/index.php?download=myfile.zip
So when you have a
? in your Original URL you need to use
%{QUERY_STRING} in
RewriteCond to check if it match what you are expecting and to gather the elements that you want with "()"
In my example I was interested to know which file the visitor was trying to access and keep it for later to be able to rebuild the new URL. In my example it was "
myfile.zip"
Now the problem I've got was "how to use my pattern in memory and past it into my new url?". I was trying to access with the dollar sign "
$" as I though it should be (like in normal Regex) but no, you need to to use the "
%" sign to use the pattern stored in memory from the previous line the $ sign will return the pattern sored in memory from the same line.
Ex:
Code:
RewriteRule ^(index)\.html$ /($1).php [L]
in the above example the $1 will hold the value 'index'.
so I use %1 and here it is, it retrieved the value put in memory the line just above.
Well I'm not sure if I was clear in my explaination but I hope that will help few people out there, as this one give me few good hours of testing before to get the expected result.
enjoy
Angel.