let me preface this by saying that any/all help would be GREATLY appreciated. I am on day 4 of trying to troubleshoot this issue. i did not design this, nor am i able to change the scheme... i can only make due with what I've been given.
the short story: I've been handed off this problem to finish up. this is the last issue I have. i have a very old site that used some form of mod-rewrite (no clue as to its exact structure, as the idiots deleted everything weeks ago) which resulted in urls that came in 2 different ways, and looked like this:
http: // www. domainname .com /keyword1/variable1/variable2/variable3
or
http: // www. domainname .com/keyword1/variable1/variable2/variable3/qualifier/variable4
the "qualifier" is one of 4 different strings that told what type of thing variable4 was.
so... i punch together the following htaccess:
rewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /keyword1/([^&]+)/([^&]+)/([^&]+)\ HTTP/
rewriteRule ^/new/keyword1/ /new/keyword1/%1/%2/%3/? [R=301,L]
simple. works fine.
that takes care of the first url. the second one is what has been waking me in my sleep for the better part of a week now. I'm coming here as a last ditch effort. the new site is going an astronomical bit more in the background, and so the urls can get complex. but, i would think this would work easily enough (the "all" and "asc" are codes pushed into the new url):
rewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /keyword1/([^&]+)/([^&]+)/([^&]+)/qualifier/([^&]+)\ HTTP/
rewriteRule ^/new/keyword1/ /new/keyword1/%1/%2/%3/1/all/all/$4/all/all/all/ASC/? [R=301,L]
but that doesn't work. i have rearranged until i am blue in the face, and just can't get it.
any ideas?