Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change multiple checks and references from 'www.php.net'; to plainly …

…'php.net' to reduce 301's, fix a few broken items, and ease a bit of the load off the server (multiple connections per page when statically referenced as 'www.php.net.';
  • Loading branch information...
commit 3cc94915886c9918657f7fd0d82a84e72391d374 1 parent 2eda87f
@db- db- authored
View
2  bin/createNewsEntry
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
PHP_SAPI == 'cli' or die("Please run this script using the cli sapi");
-$BASE = "http://www.php.net";
+$BASE = "http://php.net";
function ce(DOMDocument $d, $name, $value, array $attrs = array(), DOMNode $to = null) {
if ($value) {
View
2  copyright.php
@@ -48,7 +48,7 @@
<p>
For more information on the PHP Group and the PHP project, please see
- <a href="http://www.php.net/">the PHP homepage</a>.
+ <a href="http://php.net/">the PHP homepage</a>.
</p>
<?php site_footer();
View
2  download-logos.php
@@ -33,7 +33,7 @@ function random_bgcolor($min, $max)
<p>
Right click on one of the images and select "Save Image As" to save the
logo (except where otherwise indicated). Then, link it to the main PHP
- site at <code>www.php.net</code>.
+ site at <code>php.net</code>.
</p>
<p>
View
2  get-involved.php
@@ -424,7 +424,7 @@ functionality with extensions, and so on.
<li>PHP (the language)</li>
<li>PECL (various additional PHP functionality in the form of extensions)</li>
<li>PEAR (reusable PHP component library)</li>
- <li>Websites (www.php.net, qa.php.net, doc.php.net, edit.php.net, etc.)</li>
+ <li>Websites (php.net, qa.php.net, doc.php.net, edit.php.net, etc.)</li>
<li>Documentation (PHP, PECL, PEAR, etc.)</li>
<li>System administration (mail servers, web servers, build-boxes, monitoring, etc.)</li>
<li>Etc., etc., (etc.)</li>
View
2  git-php.php
@@ -214,7 +214,7 @@
</tr>
<tr>
<td class="sub">Creating experimental PHP extensions</td>
- <td>Maintaining www.php.net</td>
+ <td>Maintaining php.net</td>
</tr>
<tr>
<td class="sub">Submitting a patch to PHP</td>
View
2  include/header.inc
@@ -23,7 +23,7 @@ if (isset($shortname) && $shortname) {
<meta charset="utf-8"/>
<link rel="shortcut icon" href="<?php echo $STATIC_ROOT ?>favicon.ico" />
- <link rel="search" type="application/opensearchdescription+xml" href="http://www.php.net/phpnetimprovedsearch.src" title="Add PHP.net search" />
+ <link rel="search" type="application/opensearchdescription+xml" href="http://php.net/phpnetimprovedsearch.src" title="Add PHP.net search" />
<link rel="alternate" type="application/atom+xml" href="<?php echo $MYSITE ?>releases.atom" title="PHP Release feed" />
<link rel="alternate" type="application/atom+xml" href="<?php echo $MYSITE ?>feed.atom" title="PHP: Hypertext Preprocessor" />
View
6 include/layout.inc
@@ -2,9 +2,9 @@
/* $Id$ */
// Set the static content root differently on php.net
-if ($MYSITE == "http://www.php.net/") {
+if ($MYSITE == "http://www.php.net/" || $MYSITE == 'http://php.net/') {
$_SERVER['STATIC_ROOT'] = 'http://static.php.net/www.php.net';
-} elseif ($MYSITE == 'https://www.php.net/') {
+} elseif ($MYSITE == 'https://www.php.net/' || $MYSITE == 'https://php.net/') {
$_SERVER['STATIC_ROOT'] = 'https://static.php.net/www.php.net';
} elseif (!isset($_SERVER['STATIC_ROOT'])) {
$_SERVER['STATIC_ROOT'] = "";
@@ -836,7 +836,7 @@ function site_header_beta($title = '', $config = array())
// For static content
// FIXME: How does static.php.net work? Will it get the /js/ folders?
- if (false && $MYSITE == "http://www.php.net/") {
+ if (false && ($MYSITE == "http://www.php.net/" || $MYSITE == 'http://php.net/')) {
$STATIC_ROOT = "http://static.php.net/www.php.net/";
} elseif (false && !empty($_SERVER["STATIC_ROOT"])) {
$STATIC_ROOT = $_SERVER["STATIC_ROOT"];
View
4 include/loadavg.inc
@@ -28,7 +28,7 @@ function load_check()
// Adhere to user preferences if valid
$user_mirror = myphpnet_mirror();
if (isset($MIRRORS[$user_mirror]) && $MIRRORS[$user_mirror][7] == MIRROR_OK
- && $user_mirror != "http://www.php.net/") {
+ && $user_mirror != "http://php.net/") {
header("Location: $user_mirror" . substr($_SERVER['REQUEST_URI'], 1));
exit;
}
@@ -38,7 +38,7 @@ function load_check()
// Find potential close mirrors
foreach ($MIRRORS as $murl => $mirror) {
- if ($murl != 'http://www.php.net/' && $mirror[7] == MIRROR_OK && $mirror[4] != MIRROR_SPECIAL) {
+ if ($murl != 'http://php.net/' && $mirror[7] == MIRROR_OK && $mirror[4] != MIRROR_SPECIAL) {
if ($mirror[0] == $COUNTRY) {
$close_mirrors[] = $murl;
} else {
View
2  include/site.inc
@@ -17,7 +17,7 @@ function is_primary_site($site = FALSE)
{
global $MYSITE;
if (!$site) { $site = $MYSITE; }
- return $site == "http://www.php.net/";
+ return $site == "http://php.net/";
}
// Returns true if the current (or specified)
View
6 mod.php
@@ -4,7 +4,7 @@
/*
This page supports the PHP.net automoderation system
with enabling users to confirm their emails via the web.
- This script only need to run on www.php.net.
+ This script only need to run on the primary php.net box.
*/
$_SERVER['BASE_PAGE'] = 'mod.php';
@@ -12,8 +12,8 @@
site_header("Email confirmation", array("current" => "community"));
-// Only run on www.php.net
-if ($MYSITE != "http://www.php.net/") {
+// Only run on main php.net box.
+if ($MYSITE != "http://www.php.net/" && $MYSITE != 'http://php.net/') {
echo <<<ERROR
<h1>Email confirmation failed</h1>
View
4 my.php
@@ -227,7 +227,7 @@
<h2>Mirror site redirection</h2>
<p>
- The www.php.net site redirects users to mirror sites in several cases
+ The php.net site redirects users to mirror sites in several cases
automatically. It tries to find a close mirror first (a mirror in the
user's country), and if no such mirror is found, it selects one mirror
randomly. Here you can set one preferred mirror site for yourself in
@@ -249,7 +249,7 @@
// Skip inactive mirrors
if (mirror_status($murl) != MIRROR_OK ||
- $murl == "http://www.php.net/") { continue; }
+ $murl == "http://www.php.net/" || $murl == 'http://php.net/') { continue; }
// Compute user friendly mirror name
if ($murl == "NONE") {
View
2  privacy.php
@@ -8,7 +8,7 @@
<h1>Privacy Policy</h1>
<p>
- This privacy policy covers www.php.net and its associated mirrors.
+ This privacy policy covers php.net and its associated mirrors.
</p>
<h2>Email</h2>
View
2  quickref.php
@@ -156,7 +156,7 @@ function quickref_table($functions, $sort = true)
// admin/ since these tend to be script-kiddie hack attempts
if(strlen($notfound) > 2 && !strstr($notfound,'tp://') && !strstr($notfound,'admin/')):
$srch_rqst = "/ws.php?profile=$scope&q=".urlencode($notfound)."&lang=$LANG&results=10&start=0&mirror=".trim(substr($MYSITE,7),'/');
-$url = "http://www.php.net".$srch_rqst;
+$url = "http://php.net".$srch_rqst;
$data = fetch_contents($url);
if(!is_array($data)) {
$res = unserialize($data);
View
2  results.php
@@ -42,7 +42,7 @@ function exit_with_pretty_error($title, $header, $msg) {
$valid_profiles = array('all', 'local', 'manual', 'news', 'bugs', 'pear', 'pecl', 'talks');
$scope = in_array($profile, $valid_profiles) ? $profile : 'all';
-$srch_host = "www.php.net";
+$srch_host = "php.net";
$srch_rqst = "/ws.php?profile=$scope&q=$uq&lang=$ul&results=$per_page&start=$s&mirror=".trim(substr($MYSITE,7),'/');
$url = "http://".$srch_host.$srch_rqst;
View
4 sites.php
@@ -17,13 +17,13 @@
<h1>PHP.net: A Tourist's Guide</h1>
<p>
- Everyone knows the <code>www.php.net</code> site. All of us went there sooner or later,
+ Everyone knows the <code>php.net</code> site. All of us went there sooner or later,
and will keep going back there. This is the central reference point for PHP
users, and there is a wealth of information there. Not all of it is obvious.
Come with me, I'll show you.
</p>
-<h2><a href="http://www.php.net/">www.php.net</a>: Main Website</h2>
+<h2><a href="http://php.net/">php.net</a>: Main Website</h2>
<p>
This is the primary web site. The front page is where major news is published:
View
4 software.php
@@ -13,8 +13,8 @@
</p>
<p>
- <?php echo make_image("logos/php-icon-white.gif", $alt = "www.php.net", "left") ?>&nbsp;
- <a href="http://www.php.net/">www.php.net</a><br />
+ <?php echo make_image("logos/php-icon-white.gif", $alt = "php.net", "left") ?>&nbsp;
+ <a href="http://php.net/">php.net</a><br />
&nbsp;Main site for the PHP project.<br clear="left" />
</p>
<p>
View
2  tips.php
@@ -85,7 +85,7 @@ function tip_title($title, $author = '', $date = '')
<ul>
<li>Name: PHP</li>
<li>Keyword: p</li>
- <li>Address: http://www.php.net/search.php</li>
+ <li>Address: http://php.net/search.php</li>
<li>Query string: pattern=%s&amp;show=quickref</li>
</ul>
<p class="note">
View
12 ws.php
@@ -11,11 +11,11 @@
$l = isset($_REQUEST['lang']) ? htmlspecialchars($_REQUEST['lang'], ENT_QUOTES) : 'en';
$m = isset($_REQUEST['mirror']) ? htmlspecialchars($_REQUEST['mirror'], ENT_QUOTES) : '';
$sites = array( 'all'=>'php.net',
- 'local'=>'www.php.net',
- 'quickref'=>'www.php.net',
- '404quickref'=>'www.php.net',
- 'manual'=>"www.php.net/manual/$l",
- '404manual'=>"www.php.net/manual/$l",
+ 'local'=>'php.net',
+ 'quickref'=>'php.net',
+ '404quickref'=>'php.net',
+ 'manual'=>"php.net/manual/$l",
+ '404manual'=>"php.net/manual/$l",
'news'=>'news.php.net',
'bugs'=>'bugs.php.net',
'pear'=>'pear.php.net',
@@ -30,7 +30,7 @@
$scope = htmlspecialchars($_REQUEST['profile'], ENT_QUOTES);
// If they are doing a manual search in a language we don't have a translation for, default to English
if($scope == 'manual' && empty($ACTIVE_ONLINE_LANGUAGES[$l])) {
- $sites['manual'] = "www.php.net/manual/en";
+ $sites['manual'] = "php.net/manual/en";
}
} else {
$scope = 'all';
Please sign in to comment.
Something went wrong with that request. Please try again.