[wp-hackers] Possibly OT: Question about rewriting external links

Angsuman Chakraborty angsuman at taragana.com
Fri Jun 23 06:49:05 GMT 2006


Two options:

Write an Apache Output Filter - http://www.onlamp.com/pub/a/apache/2001/09/13/apache_2.html

Write a WordPress Plugin - Cache the output and replace url's before caching. Serve the cache page. I would go for customizing wp-cache 2 plugin instead of starting from scratch.

-- Angsuman
Work http://www.taragana.com/site/
Blog http://blog.taragana.com/

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com]On Behalf Of Paul Menard
Sent: Friday, June 23, 2006 8:26 AM
To: wp-hackers at lists.automattic.com
Subject: [wp-hackers] Possibly OT: Question about rewriting external
links
Importance: Low


Hey all,

This morning I received an urgent client call. I put together this  
site, about 80 pages, a few weeks ago. On this site, are links that  
take the user to an external eCommerce system to purchase products.  
Seems this external system was down so the client wanted me to go  
through the pages and change the links to point to a local page with  
a message that the eCommerce system was down blah blah blah.

I was able to put together a quick JavaScript function to read all  
the anchors on page load and changed the href. So no big issue. Sure  
I could have build some plugin filter to handle this and convert the  
content. But there are some hard-coded menu links and sidebar  
template text not page of page/post content.

I was wondering is there a good way via Apache or whatever to rewrite  
the URL as the page exits the Web server? Meaning to my knowledge for  
example rewrite rules are performed when the user hits the server,  
inbound. I'm looking to see if there is some filter to convert links  
as part of the outbound delivery to the client browser.

I don't expect to find an answer. Just looking to make sure I'm not  
missing something.

P-
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list