Hello, I am trying to do some things with mod_rewrite, but I'm not very good at it. Now I have a Rule RewriteRule ^css/video/([0-9]+)/$ /?video=$1 Code (markup): So /css/video/17/ actually uses /?video=17 But, the problem is that I want visitors using old links to be redirected to the new URL (So , do the inverse thing, if an user enters /?video=17 to be redirected to /css/video/17/ ,that actually will use /?video=17 ) Do you think is it possible to do that with Mod Rewrite? Or with PHP maybe?
Hello, well I found a solution (Thanks to "ekneuss" at #apache@quakenet.org), but I am still seeking for a "cleaner" alternative. It would consist in placing a $new var, and using /?video=XX&new in the New, rewrited urls, and in case an user visites /?video=XX withour $new, it would be redirected to the new, rewrited URL. What do you think of that? Will I have any problem with that? Is there any other possibility? (using rewrite, or apache) PS: "krt" solution didn't work ----------- EDIT: Well, the &new solution seems to work. Check , for example www.chetos.es/?video=39 or www.chetos.es/?game=dod&top=15&video=10 (old urls) and see how you are redirected to the new, static urls -----------
I fixed the issue with my one, I used QUERY_STRING instead of REQUEST_URI during a mind block or something