Conversation
|
@derickr Thanks for the ping. While redirecting makes sense, there are a couple of things I'm a little concerned about:
I'd also be interested to know how to get to QA releases for Windows. Looks like this is via https://www.php.net/pre-release-builds.php ? If so, where can I submit a PR to make that page a little more scannable ? I'm also not so sure about that "I want to use PHP for" dropdown - is it just me or does nothing change when you toggle between "Web development" and "CLI/library dev" ? |
| RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE] | ||
| RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1 | ||
| RewriteRule ^/downloads/(.*) https://downloads.php.net/~windows/$1 |
There was a problem hiding this comment.
| RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE] | |
| RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1 | |
| RewriteRule ^/downloads/(.*) https://downloads.php.net/~windows/$1 | |
| RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE] | |
| RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1 | |
| RewriteRule ^/downloads/(.*) https://downloads.php.net/~windows/$1 |
There was a problem hiding this comment.
This wasn't the right way, but it was broken and I updated. (We use tabs for indentation, and spaces for alignment in these files).
| RewriteRule ^/$ https://www.php.net/ | ||
| RewriteRule ^/download$ https://www.php.net/downloads.php?os=windows |
There was a problem hiding this comment.
I think we should redirect both to the downloads page with os=windows as the requested url is related to windows and php.net being the home page is not windows specific.
There was a problem hiding this comment.
I had thought www.php.net would be better, as the "main page" here just has PHP (on Windows) specific news. As news is on www.php.net (and not on https://www.php.net/downloads.php) that would be the better destination.
So I haven't changed this yet…
There was a problem hiding this comment.
Yes. that makes sense.
| RewriteRule ^/snapshots$ https://www.php.net/pre-release-builds.php#windows [NE] | ||
| RewriteRule ^/snapshots/$ https://www.php.net/pre-release-builds.php#windows [NE] | ||
| RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE] | ||
| RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1 |
There was a problem hiding this comment.
That breaks the archive links on windows.php.net: /downloads/releases/archives/... becomes /~windows/releases/archives/archives/...
/downloads/releases/and sub directories on windows.php.net should redirect to ~windows/releases and corresponding subdirectories on downloads.php.net.
There was a problem hiding this comment.
OK, I will change this.
But I had picked this specifically, as https://windows.php.net/download has links to
https://windows.php.net/downloads/releases/php-8.5.1-nts-Win32-vs17-x64.zip etc, and:
https://downloads.php.net/~windows/releases/php-8.5.1-nts-Win32-vs17-x64.zip doesn't exist, but
https://downloads.php.net/~windows/releases/archives/php-8.5.1-nts-Win32-vs17-x64.zip does.
| ServerAlias {{ windows_domain_alias }} | ||
|
|
||
| ServerAdmin {{ systems_email }} | ||
| Redirect / https://qa.php.net/ |
There was a problem hiding this comment.
We should not redirect windows.php.net webroot to qa.php.net, it should go to the downloads page with os=windows.
There was a problem hiding this comment.
No, we should not redirect it to qa.php.net.
It should redirect to https://windows.php.net (this entry is for the http:// variant). I copied this over from the qa property and forgot to change this.
(In fact, this entry should never get used, as the CDN is configured to talk to the https:// variant anyway)
derickr
left a comment
There was a problem hiding this comment.
While redirecting makes sense, there are a couple of things I'm a little concerned about:
- The info which is in the left sidebar of the windows.php.net page, in particular the information about Visual Studio. I remember when I first installed PHP for Windows myself (without a WAMP installer), that info saved my bacon.
I believe we should integrate that into https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2, which already holds more up to date information.
- Access to historical versions as https://www.php.net/releases/ looks to only contain the Linux versions.
The historical releases for Windows are (already) also available at https://downloads.php.net/~windows/releases/archives/ — I propose we add that link to the side bar of www.php.net/downloads.php as ([Windows](https://downloads.php.net/~windows/releases/archives/)) where it now says "Old Archives".
I'd also be interested to know how to get to QA releases for Windows. Looks like this is via https://www.php.net/pre-release-builds.php ? If so, where can I submit a PR to make that page a little more scannable ?
It lives at https://github.com/php/web-php/blob/master/pre-release-builds.php
Instructions on how to set up a local environment are at https://github.com/php/web-php/blob/master/README.md (it's git clone && cd web-php && php -S …).
I'm also not so sure about that "I want to use PHP for" dropdown - is it just me or does nothing change when you toggle between "Web development" and "CLI/library dev" ?
That's right, for Windows. We could add better instructions there for each. But when we set up the downloads page like this, no such instructions were available.
If you want to make a PR to add that, the following things need to be done (in https://github.com/php/web-php/blob/master/):
- Create
include/download-instructions/windows-downloads-web.phpandinclude/download-instructions/windows-downloads-web.phpcontaining the instructions for each variant, and then includewindows-downloads.php. - Change https://github.com/php/web-php/blob/master/downloads-get-instructions.php#L58 to add a similar
if/elsefor$options['osvariant'] === "{$options['os']}-downloads"as there is now for docker.
| ServerAlias {{ windows_domain_alias }} | ||
|
|
||
| ServerAdmin {{ systems_email }} | ||
| Redirect / https://qa.php.net/ |
There was a problem hiding this comment.
No, we should not redirect it to qa.php.net.
It should redirect to https://windows.php.net (this entry is for the http:// variant). I copied this over from the qa property and forgot to change this.
(In fact, this entry should never get used, as the CDN is configured to talk to the https:// variant anyway)
| RewriteRule ^/$ https://www.php.net/ | ||
| RewriteRule ^/download$ https://www.php.net/downloads.php?os=windows |
There was a problem hiding this comment.
I had thought www.php.net would be better, as the "main page" here just has PHP (on Windows) specific news. As news is on www.php.net (and not on https://www.php.net/downloads.php) that would be the better destination.
So I haven't changed this yet…
| RewriteRule ^/snapshots$ https://www.php.net/pre-release-builds.php#windows [NE] | ||
| RewriteRule ^/snapshots/$ https://www.php.net/pre-release-builds.php#windows [NE] | ||
| RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE] | ||
| RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1 |
There was a problem hiding this comment.
OK, I will change this.
But I had picked this specifically, as https://windows.php.net/download has links to
https://windows.php.net/downloads/releases/php-8.5.1-nts-Win32-vs17-x64.zip etc, and:
https://downloads.php.net/~windows/releases/php-8.5.1-nts-Win32-vs17-x64.zip doesn't exist, but
https://downloads.php.net/~windows/releases/archives/php-8.5.1-nts-Win32-vs17-x64.zip does.
| RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE] | ||
| RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1 | ||
| RewriteRule ^/downloads/(.*) https://downloads.php.net/~windows/$1 |
There was a problem hiding this comment.
This wasn't the right way, but it was broken and I updated. (We use tabs for indentation, and spaces for alignment in these files).
I don't think that's correct. This is not about building your own version of PHP. This is about running (pre-compiled) PHP on Windows. Those VS packages need to be installed on Windows to even be able to run PHP, so this is/should be end-user facing information, not internal information. The internals page should include a directive to update the VS related info for Windows on the end-user facing pages when a different VS is used to build the standard Windows packages.
👍🏻
Thanks for those pointers. I'll have a look when I have some brain space (which may be a while). |
@shivammathur fixed/addressed this, with php/web-php#1869 I've also updated the PR with the comments. |
efb9f66 to
bc148ae
Compare
Excellent! Thank you both! |
The idea is that this replaces the current windows.php.net server, with redirects for all original content to the new location on either downloads.php.net or their integrated location on www.php.net
It's possible that I am missing better redirects for common links, so please let me know if I am missing any important ones.
/cc @shivammathur @jrfnl