Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

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.

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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