# 将类别重定向到外部URL

**URL:** https://meta.discourse.org/t/redirect-category-to-external-url/85691
**Category:** Support
**Created:** [2018年四月19日 05:32 UTC](https://meta.discourse.org/t/redirect-category-to-external-url/85691 "2018-04-19T05:32:29Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Zyniker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zyniker/32/120004_2.png) [@Zyniker](https://meta.discourse.org/u/Zyniker)
#### Post date: [2018年四月20日 03:51 UTC](https://meta.discourse.org/t/redirect-category-to-external-url/85691/6 "2018-04-20T03:51:38Z")

</div>

So, related issue: I’ve now implemented a redirect (using JavaScript), but… it works only on refresh, which is clearly suboptimal. At any rate, here’s the code I’m using:

```plaintext
$( document ).ready(function() {
	if ( window.location.href === "https://omnifora.com/c/redirect-politifora" ) {
		window.location.replace( "https://politifora.com/" );
	}
});

```

As should be obvious from the code, [Omnifora](https://omnifora.com/) is the primary site in this network and I am attempting to redirect a [Politifora category on Omnifora](https://omnifora.com/c/redirect-politifora) to [Politifora](https://politifora.com/). I’ve already eliminated caching (browser, server, Cloudflare) as a potential culprit. Is there some quirk in Discourse that would cause this redirect not to trigger?

---

_[View the full topic](https://meta.discourse.org/t/redirect-category-to-external-url/85691)._
