I'm trying to redirect this... http://www.wfmc.org/administrator/components/com_civicrm/civicrm/extern/url.php?u=878&qid=3686395 -- Where '&qid=3686395' varies from link to link. How can I redirect everything that looks like this 'http://www.wfmc.org/administrator/components/com_civicrm/civicrm/extern/url.php?u=878' where it will take care of everything after the 878 to another website.

link|improve this question
feedback

1 Answer

I'm assuming your apache is configured to serve 'www.wfmc.org'. In your vhost or .htaccess file (assuming you have Options FileInfo allowed for your domain's documentroot):

RewriteRule ^administrator/components/com_civicrm/civicrm/extern/url.php?u=878(.*) http://someURL/someFile?$1 [L]

that should work.

link|improve this answer
This is the exact string I used. RewriteRule ^administrator/components/com_civicrm/civicrm/extern/url.php?u=878(.*) bpm.com/managing-enterprise-performance-webinar.html?$1 --------- didn't work. got rid of the [L] since there was stuff underneath it in a different section of the .htaccess. – j Reid Nov 30 '10 at 16:41
try 'bpm.com';. also, do you have a rewrite log enabled? it might be helpful in determining rewrite issues. – DTest Nov 30 '10 at 18:31
also, I suck. I forgot the [R=301] flag, so I would use [R=301, L]. I'm not sure what stuff below this rewrite rule you'd have that you'd want to run after issuing the redirect. – DTest Dec 1 '10 at 18:53
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.