What the fuck is wrong with that redirect code ? Why it's not working Cred Forumsrothers... Looking for some help

What the fuck is wrong with that redirect code ? Why it's not working Cred Forumsrothers... Looking for some help.

Redirect : test.com/dev/videos/action?o=mv => test.com/dev/videos/action/views/

RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)o=mv($|&)
RewriteRule ^dev/videos/action$ /dev/videos/action/views/? [L,R=301]

Other urls found in this thread:

domain.com/dev/videos/action/views/?
stackoverflow.com/a/13989159
twitter.com/SFWRedditVideos

Anyone ? I'm desperate for the help...

are you putting that in htaccess?

Yep

Let me try again...

More legs

give me an example of what an actual link is currently vs what you want it to be

Here they are

I was trying to redirect,

domain.com/dev/videos/action?o=mv
to
domain.com/dev/videos/action/views/

Sorting action videos with view counts, now script changed and i don't want to fuck my SEO, so i need to 301 old urls to new ones.

I got that part, but I'm assuming the string on the end changes, and you want to append it somehow to the 2nd url. Give me a real world example of what the start and end look like currently (doesn't need actual domain name or anything..)

Those are the real url's,

There are three string for each category,

?o=mv
?o=tr
?o=lg

Most stupid script i ever seen.

ohh shit, ok I see what you're getting at now - hang on a sec, researching...

I LOVE YOU

what should be at the end of /views based on your last example?

Nothing

if you're not passing the variable can you just make it simple then and redirect any traffic to /action ?

Google indexed ?o=mv and i'm getting almost all of my traffic from there.

Would put up with that face for that body.

ok i think I got it, standby...

I'm ready and waiting

give this a try...

RewriteEngine On
RewriteCond %{QUERY_STRING} ^o=([^&]+)
RewriteRule ^/dev/videos/action$ domain.com/dev/videos/action/views/? [L,R=301]

But... But... what about other strings ? o=tr, lg etc..

that should pick them up regardless... hopefully:

stackoverflow.com/a/13989159

I tried everything on that link but not worked :(

sorry man, might be an issue with your apache setup then - can't tell without seeing server logs or the like.

good luck though

more of her?