Title: [Plugin: Amazon Associate Filter] Plugin rewrites wireless.amazon.com links to amazon.com
Last modified: August 19, 2016

---

# [Plugin: Amazon Associate Filter] Plugin rewrites wireless.amazon.com links to amazon.com

 *  [archon810](https://wordpress.org/support/users/archon810/)
 * (@archon810)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-amazon-associate-filter-plugin-rewrites-wirelessamazoncom-links-to-amazoncom/)
 * Amazon recently launched their Wireless store – wireless.amazon.com but links
   to this site, which has a more custom mobile store, get rewritten back to amazon.
   com by this plugin.
 * Please fix this, if you get a chance.
 * [http://wordpress.org/extend/plugins/amazon-associate-filter/](http://wordpress.org/extend/plugins/amazon-associate-filter/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [archon810](https://wordpress.org/support/users/archon810/)
 * (@archon810)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-amazon-associate-filter-plugin-rewrites-wirelessamazoncom-links-to-amazoncom/#post-1577287)
 * I ended up doing a quick fix myself. In fact, I don’t know why it would rewrite
   the subdomain in the first place. Maybe you can incorporate this into trunk if
   you get a chance.
 *     ```
       svn diff
       Index: amazon_associate_filter.php
       ===================================================================
       --- amazon_associate_filter.php (revision 185613)
       +++ amazon_associate_filter.php (working copy)
       @@ -34,8 +34,8 @@
          $affiliate_code=get_option('amazon_associate_filter_id');
   
          $content=preg_replace(
       -    '/http:\/\/[^>]*?amazon.([^\/]*)\/([^>]*?ASIN|gp\/product|exec\/obidos\/tg\/detail\/-|[^>]*?dp)\/([0-9a-zA-Z]{10})[a-zA-Z0-9#\/\*\-\?\&\%\=\,\._;]*/i',
       -    'http://www.amazon.$1/dp/$3/?tag='.$affiliate_code,
       +    '/http:\/\/([^>]*?amazon.)([^\/]*)\/([^>]*?ASIN|gp\/product|exec\/obidos\/tg\/detail\/-|[^>]*?dp)\/([0-9a-zA-Z]{10})[a-zA-Z0-9#\/\*\-\?\&\%\=\,\._;]*/i',
       +    'http://$1$2/dp/$4/?tag='.$affiliate_code,
            $content
          );
          return $content;
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Amazon Associate Filter] Plugin rewrites wireless.amazon.com
links to amazon.com’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/amazon-associate-filter.svg)
 * [Amazon Associate Filter](https://wordpress.org/plugins/amazon-associate-filter/)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-associate-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-associate-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-associate-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-associate-filter/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [archon810](https://wordpress.org/support/users/archon810/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-amazon-associate-filter-plugin-rewrites-wirelessamazoncom-links-to-amazoncom/#post-1577287)
 * Status: not resolved