-1
私の仕事ではPHPを使用していますが、約20ページあります。私は、ABテスト用のクエリ文字列と一緒にすべてのURLを複製する必要があります。PHPでクエリ文字列を追加してURLを重複して表示する方法
Original : www.lorem.com/index.php
Duplicate: www.lorem.com/index.php?custom (Something like that)
私の仕事ではPHPを使用していますが、約20ページあります。私は、ABテスト用のクエリ文字列と一緒にすべてのURLを複製する必要があります。PHPでクエリ文字列を追加してURLを重複して表示する方法
Original : www.lorem.com/index.php
Duplicate: www.lorem.com/index.php?custom (Something like that)
をチームに良い解決策が.htaccess
文書内のURL書き換えスキームを使用することができ、ありがとうございました。以下は、仕事ができるようなソリューション:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)/custom$ /$1-test.php [QSA,NC,L]
</IfModule>
これは、次が真であることを原因となります。
Original : www.lorem.com/index.php
Duplicate : www.lorem.com/index-test.php (When /custom is appended, this page is shown)
は、URL書き換えの参照のためにこれを見ている:https://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/