RewriteEngine On
RedirectMatch http://api.fuckedapps.com//app_dl.php?app_id=([0-9])$ http://fuckedapps.com/app_dl.php?app_id=$1
I am trying to redirect any url like this:
http://api.fuckedapps.com//app_dl.php?app_id=31
to this:
http://fuckedapps.com/app_dl.php?app_id=$1
You can try this one (sorry, do not have Apache running here right now, so cannot test it on live system):
I do not match query string, as it is the same on both ends, so I just use
QSAflag to copy it unchanged.Also — consider using 302 redirect instead of 301 during testing (modern browsers do cache 301 redirects, so you may see wrong behaviour when rule is changed but browser still seems to be using old redirect) and change back to 301 after you are happy with results.
I’m just not sure about
//in your original URL — how Apache/mod_rewrite handles it exactly. But it should work fine.BTW — this means to be placed in .htaccess in website root folder. If placed elsewhere some modification may be required.