私のフォーラムの URL には、どこにでも「index.php」があります。「テスト」に置き換えたい。私のPHPファイルには、次の行があります。
// Makes it easier to refer to things this way.
$scripturl = $boardurl . '/index.php';
私はそれを次のように変更してみました:
// Makes it easier to refer to things this way.
$scripturl = $boardurl . '/test';
ただし、404 エラーが返されました。そのためには preg_replace を使用する必要があると言われました。PHP マニュアルを見たところ、パターン、置換、およびサブジェクトが必要であると書かれています。主題部分について混乱しています。
私はこれを試しましたが、勝てません:
// Makes it easier to refer to things this way.
$scripturl = $boardurl . preg_replace('/index.php','/test','?');
URL の例を次に示します: "domain.com/index.php?node=forum"
「domain.com/test?node=forum」のようにしたい