WordPress.org

Making WordPress.org

Opened 3 years ago

Last modified 4 months ago

#2575 assigned defect

Codex: #dotorgredirect does not redirect to Rosetta sites

Reported by: SergeyBiryukov Owned by: Otto42
Milestone: Priority: normal
Component: Codex Keywords:
Cc:

Description (last modified by SergeyBiryukov)

I'm trying to redirect an old "Forum rules" page on Codex to a new page on the forums.

The #dotorgredirect directive is used for redirecting pages to developer.w.org, so I thought this would work:

{{#dotorgredirect:https://ru.wordpress.org/support/forum-rules/}}

However, it just displays "Invalid Redirect" on the page.

Is there a whitelist in the redirect script? Could we add forums to that list?

Change History (14)

#1 @SergeyBiryukov
3 years ago

  • Description modified (diff)

#2 @samuelsidler
3 years ago

This is based on a whitelist. @Otto42 should be able to help here.

#3 @dd32
21 months ago

  • Owner set to dd32
  • Status changed from new to accepted

Just to note, the plugin only allows redirects to the following hostnames:

  • developer.wordpress.org
  • make.wordpress.org

I don't see any harm in allowing *.wordpress.org / wordpress.org myself though.
Any thoughts from anyone as to why it's as it is? @otto42?

#4 follow-up: @Otto42
21 months ago

I wrote it that way because that's the way I was told to write it. No other reason. It was originally intended only for redirection of moved documentation. It can be expanded in scope if needed.

#5 in reply to: ↑ 4 ; follow-up: @SergeyBiryukov
10 months ago

Replying to Otto42:

It was originally intended only for redirection of moved documentation. It can be expanded in scope if needed.

With the Systems request deployed, I thought a redirect to https://ru.wordpress.org/support/forum-rules/ would now work, but still getting an "Invalid Redirect" error.

Apparently Rosetta domains like *.wordpress.org are still not whitelisted, only the main domain is?

#6 in reply to: ↑ 5 ; follow-up: @dd32
10 months ago

Replying to SergeyBiryukov:

Replying to Otto42:

It was originally intended only for redirection of moved documentation. It can be expanded in scope if needed.

With the Systems request deployed, I thought a redirect to https://ru.wordpress.org/support/forum-rules/ would now work, but still getting an "Invalid Redirect" error.

Apparently Rosetta domains like *.wordpress.org are still not whitelisted, only the main domain is?

Correct. Only wordpress.org was added.

Last edited 10 months ago by dd32 (previous) (diff)

#7 @dd32
10 months ago

  • Owner changed from dd32 to Otto42
  • Status changed from accepted to assigned

#8 in reply to: ↑ 6 @SergeyBiryukov
10 months ago

Replying to dd32:

Correct. Only wordpress.org was added.

Thanks! While we're at it, could we add *.wordpress.org then? I tried looking into it myself, but apparently the plugin is not in the dotorg repo.

This ticket was mentioned in Slack in #meta by sergey. View the logs.


4 months ago

#10 @SergeyBiryukov
4 months ago

  • Summary changed from Codex: #dotorgredirect does not redirect to forums to Codex: #dotorgredirect does not redirect to Rosetta sites

#12 @Otto42
4 months ago

Okay, I added wordpress.org in deploy:8223 but forgot about *.wordpress.org. I'll make that change shortly too.

#13 follow-up: @Otto42
4 months ago

Change made to deploy revision 8740. It will accept wordpress.org and *.wordpress.org. It was also send 301's for the redirects instead of 302's.

#14 in reply to: ↑ 13 @SergeyBiryukov
4 months ago

Replying to Otto42:

Change made to deploy revision 8740. It will accept wordpress.org and *.wordpress.org.

Thanks! Is it deployed yet? Still getting "Invalid Redirect" for this:

{{#dotorgredirect:https://ru.wordpress.org/support/forum-rules/}}
Note: See TracTickets for help on using tickets.