web: Save a needless 301 redirect from /plans to /plans/.

This commit is contained in:
Alex Vandiver 2023-03-23 02:53:14 +00:00 committed by Tim Abbott
parent bf06d493ee
commit c686c5ed0f
16 changed files with 29 additions and 29 deletions

View File

@ -60,9 +60,9 @@ def plans_view(request: HttpRequest) -> HttpResponse:
if realm is not None:
if realm.plan_type == Realm.PLAN_TYPE_SELF_HOSTED and settings.PRODUCTION:
return HttpResponseRedirect("https://zulip.com/plans")
return HttpResponseRedirect("https://zulip.com/plans/")
if not request.user.is_authenticated:
return redirect_to_login(next="/plans")
return redirect_to_login(next="/plans/")
if request.user.is_guest:
return TemplateResponse(request, "404.html", status=404)
customer = get_customer_by_realm(realm)

View File

@ -146,7 +146,7 @@ browsers will experience weird/confusing redirects.
## Open realm creation
Installations like [Zulip Cloud](https://zulip.com/plans) that wish to
Installations like [Zulip Cloud](https://zulip.com/plans/) that wish to
allow anyone on the Internet to create new Zulip organizations can do
so by setting `OPEN_REALM_CREATION = True` in
`/etc/zulip/settings.py`. Note that offering Zulip hosting to anyone

View File

@ -20,7 +20,7 @@ Zulip's system supports:
period.
In Zulip Cloud, message retention policies are available on the Zulip
Cloud Standard and Zulip Cloud Plus [plans](https://zulip.com/plans),
Cloud Standard and Zulip Cloud Plus [plans](https://zulip.com/plans/),
as well as for the hundreds of communities with sponsored Cloud
Standard hosting.

View File

@ -1,7 +1,7 @@
# Zulip Cloud billing
This page answers some frequently asked questions about [Zulip Cloud plans and
pricing](https://zulip.com/plans). If you have any other questions, please don't hesitate to
pricing](https://zulip.com/plans/). If you have any other questions, please don't hesitate to
reach out at sales@zulip.com.
## Differences between Zulip Cloud plans

View File

@ -204,7 +204,7 @@
<a href="/upgrade/">
<button type="submit" class="button green">Upgrade to Standard</button>
</a>
<a href="/plans">
<a href="/plans/">
<button type="submit">View all plans</button>
</a>
</p>

View File

@ -22,7 +22,7 @@
<p>
Open-source projects, research collaborations, volunteer
organizations. <br />Most communities get an 85%+ discount
on <a href="/plans">Zulip Cloud Standard</a>!
on <a href="/plans/">Zulip Cloud Standard</a>!
</p>
<div class="hero-text">
Learn how the <a href="/case-studies/recurse-center/">Recurse
@ -50,7 +50,7 @@
</div>
<div class="bottom-register-buttons extra_margin_before_footer">
<h1>
Most communities get an 85%+ discount on <a href="/plans">Zulip Cloud Standard</a>!
Most communities get an 85%+ discount on <a href="/plans/">Zulip Cloud Standard</a>!
</h1>
<div class="bottom-text-large">
<p> Join the hundreds of communities we sponsor. Contact <a href="mailto:sales@zulip.com">

View File

@ -22,7 +22,7 @@
<div class="content">
<h1 class="center">Zulip for conferences and events</h1>
<p>Conferences, workshops, hackathons. In-person, online, and anything in between.
<br/><a href="/plans">Zulip Cloud Standard</a> is free for
<br/><a href="/plans/">Zulip Cloud Standard</a> is free for
academic conferences and most other non-profit events!
</p>
</div>
@ -280,7 +280,7 @@
<div class="feature-end">
<div class="bottom-register-buttons">
<h1>
<a href="/plans">Zulip Cloud Standard</a> is free for academic conferences and
<a href="/plans/">Zulip Cloud Standard</a> is free for academic conferences and
most other non-profit events!
</h1>
<div class="hero-buttons center">

View File

@ -22,7 +22,7 @@
<h1 class="center">Zulip for open source projects</h1>
<p>
Grow your community with thoughtful and inclusive discussion.
<br/><a href="/plans">Zulip Cloud Standard</a> is free for open-source
<br/><a href="/plans/">Zulip Cloud Standard</a> is free for open-source
projects!
</p>
</div>
@ -123,7 +123,7 @@
<li>
<div class="list-content">
Maintain access to your organization's entire
message history with free <a href="/plans">Zulip
message history with free <a href="/plans/">Zulip
Cloud Standard</a> hosting. Information is at your
fingertips with Zulip's <a
href="/help/search-for-messages">powerful full-text
@ -710,7 +710,7 @@
<div class="bottom-register-buttons extra_margin_before_footer">
<h1>
<a href="/plans">Zulip Cloud Standard</a> is free for open-source projects!
<a href="/plans/">Zulip Cloud Standard</a> is free for open-source projects!
</h1>
<div class="bottom-text-large">
<p>Join the hundreds of open-source projects we sponsor.</p>

View File

@ -23,7 +23,7 @@
<h1 class="center">Zulip for research</h1>
<p>
Chat for your project, research group, department or scientific
field. <br/><a href="/plans">Zulip Cloud Standard</a> is free for academic
field. <br/><a href="/plans/">Zulip Cloud Standard</a> is free for academic
research!
</p>
</div>
@ -128,7 +128,7 @@
<li>
<div class="list-content">
Maintain access to your organization's entire
message history with free <a href="/plans">Zulip
message history with free <a href="/plans/">Zulip
Cloud Standard</a> hosting. Information is at your
fingertips with Zulip's <a
href="/help/search-for-messages">powerful full-text
@ -394,7 +394,7 @@
<div class="feature-end">
<div class="bottom-register-buttons extra_margin_before_footer">
<h1>
<a href="/plans">Zulip Cloud Standard</a> is free for
<a href="/plans/">Zulip Cloud Standard</a> is free for
academic research!
</h1>
<div class="hero-buttons center">

View File

@ -129,7 +129,7 @@
<div class="item">
<div class="item-inner">
<p class="tour-item-header tour-item-header-top-push tour-item-header-centered">Zulip Free is free for an unlimited number of users.</p>
<a href="/plans" class="call-to-action">
<a href="/plans/" class="call-to-action">
{{ _('See plans and pricing') }}
</a>
<div class="other-resources">
@ -552,7 +552,7 @@
{{ _('Log in now') }}
</a>
{% else %}
<a href="/plans" class="styled-button button green">
<a href="/plans/" class="styled-button button green">
{{ _('See plans and pricing') }}
</a>
{% endif %}

View File

@ -62,7 +62,7 @@ contributors, and more than 75 with 100+ commits." %}
</div>
<p>
Kandra Labs provides commercial Zulip hosting and on-premises support
at <a href="https://zulip.com/plans">https://zulip.com</a>,
at <a href="https://zulip.com/plans/">https://zulip.com</a>,
and employs the core developers of the project. It was
started in June 2016 to help sustain the growth of the Zulip
project. Kandra Labs is funded by

View File

@ -82,7 +82,7 @@ An important part of Zulips mission is ensuring that worthy organizations, fr
communities](/case-studies/lean/), are able to use Zulip whether or not they
have funding.
We sponsor [Zulip Cloud Standard](/plans) hosting for [open-source
We sponsor [Zulip Cloud Standard](/plans/) hosting for [open-source
projects](/for/open-source/), [research groups](/for/research/),
[education](/for/education/), [non-profits](/for/communities/) and other
[communities](/for/communities/). This program has grown exponentially since its

View File

@ -66,7 +66,7 @@ class PorticoDocumentationSpider(BaseDocumentationSpider):
start_urls = [
"http://localhost:9981/hello/",
"http://localhost:9981/history/",
"http://localhost:9981/plans",
"http://localhost:9981/plans/",
"http://localhost:9981/team",
"http://localhost:9981/apps",
"http://localhost:9981/integrations/",

View File

@ -18,11 +18,11 @@
{{else}}
<li class="org-info org-plan hidden-for-spectators small-font-size">
{{#if is_plan_limited }}
<a href="/plans" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Free</a>
<a href="/plans/" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Free</a>
{{else if is_plan_standard}}
<a href="/plans" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Standard</a>
<a href="/plans/" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Standard</a>
{{else if is_plan_standard_sponsored_for_free}}
<a href="/plans" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Standard (sponsored)</a>
<a href="/plans/" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Standard (sponsored)</a>
{{/if}}
</li>
{{/if}}
@ -149,7 +149,7 @@
{{/if}}
{{#if show_plans}}
<li role="presentation" class="hidden-for-spectators">
<a href="/plans" target="_blank" rel="noopener noreferrer" role="menuitem">
<a href="/plans/" target="_blank" rel="noopener noreferrer" role="menuitem">
<i class="fa fa-rocket" aria-hidden="true"></i> {{t 'Plans and pricing' }}
</a>
</li>

View File

@ -23,7 +23,7 @@ gear_info = {
"organization-settings": ["Organization settings", "/#organization/organization-profile"],
"integrations": ["Integrations", "/integrations/"],
"stats": ["Usage statistics", "/stats"],
"plans": ["Plans and pricing", "/plans"],
"plans": ["Plans and pricing", "/plans/"],
"billing": ["Billing", "/billing"],
"invite": ["Invite users", "/#invite"],
"about-zulip": ["About Zulip", "/#about-zulip"],

View File

@ -423,7 +423,7 @@ class PlansPageTest(ZulipTestCase):
realm.save(update_fields=["plan_type"])
result = self.client_get("/plans/", subdomain="zulip")
self.assertEqual(result.status_code, 302)
self.assertEqual(result["Location"], "/accounts/login/?next=/plans")
self.assertEqual(result["Location"], "/accounts/login/?next=/plans/")
guest_user = "polonius"
self.login(guest_user)
@ -463,14 +463,14 @@ class PlansPageTest(ZulipTestCase):
with self.settings(PRODUCTION=True):
result = self.client_get("/plans/", subdomain="zulip")
self.assertEqual(result.status_code, 302)
self.assertEqual(result["Location"], "https://zulip.com/plans")
self.assertEqual(result["Location"], "https://zulip.com/plans/")
self.login("iago")
# SELF_HOSTED should hide the local plans page, even if logged in
result = self.client_get("/plans/", subdomain="zulip")
self.assertEqual(result.status_code, 302)
self.assertEqual(result["Location"], "https://zulip.com/plans")
self.assertEqual(result["Location"], "https://zulip.com/plans/")
# But in the development environment, it renders a page
result = self.client_get("/plans/", subdomain="zulip")