Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <2AdMIo7aBbHKVrbzkhqvFg8fCec@jntp>
Deutsch   English   Français   Italiano  
<2AdMIo7aBbHKVrbzkhqvFg8fCec@jntp>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!weretis.net!feeder8.news.weretis.net!pasdenom.info!from-devjntp
Message-ID: <2AdMIo7aBbHKVrbzkhqvFg8fCec@jntp>
JNTP-Route: news2.nemoweb.net
JNTP-DataType: Article
Subject: URL rewriting qui ne marche plus correctement
Newsgroups: fr.comp.infosystemes,fr.comp.lang.php
Followup-To: fr.comp.infosystemes
JNTP-HashClient: 99T5m_BMElZXYxphJgAW1GnUDAo
JNTP-ThreadID: Fa6xiCZJXu6uaRx43QgLLcmMq2s
JNTP-Uri: http://news2.nemoweb.net/?DataID=2AdMIo7aBbHKVrbzkhqvFg8fCec@jntp
User-Agent: Nemo/0.999a
JNTP-OriginServer: news2.nemoweb.net
Date: Sun, 23 Jun 24 12:52:04 +0000
Organization: Nemoweb
JNTP-Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:109.0) Gecko/20100101 Firefox/115.0
Injection-Info: news2.nemoweb.net; posting-host="516ee13c1e79fa65aedf115a32aee346f9289ca9"; logging-data="2024-06-23T12:52:04Z/8914854"; posting-account="44@news2.nemoweb.net"; mail-complaints-to="julien.arlandis@gmail.com"
JNTP-ProtocolVersion: 0.21.1
JNTP-Server: PhpNemoServer/0.94.5
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-JNTP-JsonNewsGateway: 0.96
From: pehache <pehache.7@gmail.com>
Bytes: 3180
Lines: 49

(fu2 fr.comp.infosystemes)

Bonjour,

Je transfère un site hébergé chez OVH vers une page perso Free. A 
l'origine c'était (principalement) un forum phpBB. Il n'est plus utilisé 
depuis longtemps mais je le garde en ligne à titre d'archive.

Il y a quelques années déjà, pour réduire le travail maintenance à 
faire (notamment les MAJ phpBB) je l'avais converti en une version 
statique purement HTML. Pour ça j'avais aspiré tout le site avec "wget" 
et remis en ligne les fichiers HTML produits. Pour que les liens entrants 
php continuent néanmoins à fonctionner j'avais écrit des script php qui 
transformaient les URL pour pointer vers les page HTML statiques créée 
par wget

En pratique par exemple cette URL 
http://forum.monsite.fr/viewtopic.php?f=5&t=482
devenait
http://forum.monsite.fr/viewtopic.php%3Ff=5&t=482.html
Grâce à ce fichier "viewtopic.php":

==============================================
<?php
  if (substr($argv[count($argv)-1],-4)!="html") {
          header('Location: 
'.$_SERVER["SCRIPT_URI"]."%3F".$_SERVER["QUERY_STRING"].".html");
          exit(); } 
?>
==============================================

Ca marchait très bien. Mais sur la page perso Free ça ne marche pas. 
L'URL est bien réécrite (donc le fichier php est exécuté), mais le 
résultat n'est pas conforme à ce qu'il était avant:

http://mapage.free.fr/monsite/viewtopic.php?f=5&t=482
devient:
http://mapage.free.fr/monsite/%3Ff=5&t=482.html

"viewtopic.php" est donc supprimé de l'URL...

Je suis nul en php (à l'époque on m'avait indiqué quoi mettre dans le 
fichier, déjà). 

- Est-ce que le script php ci-dessus est correct (auquel cas c'est chez 
Free qu'il y a un problème) ?
- Est-ce qu'il incorrect et ne marche que par chance chez OVH ?
- Est-ce que c'est un problème de version de php ? Sur l'hébergement OVH 
c'est encore la version 5.4...