我想从
重定向所有网址https://englishact.com/jumblesolver/?zig=(。*)
要
https://englishact.com/jumblesolver/jumblesolver.php?zig= $ 1
这是我正在尝试的htaccess代码
RewriteRule ^jumblesolver/?zig=(.*)$ jumblesolver/jumblesolver.php?zig=$1 [R=301,NC,L]
但代码没有执行。 证明: 如果你去
https://englishact.com/jumblesolver/?zig=tagalog
和
https://englishact.com/jumblesolver/jumblesolver.php?zig=tagalog
您会看到不同的结果。我希望两个结果都像
一样https://englishact.com/jumblesolver/jumblesolver.php?zig=tagalog
答案 0 :(得分:1)
将代码添加到您的顶部 jumble solver 页
<?php
if(isset($_GET['zig'])){
$url = "https://englishact.com/jumblesolver/jumblesolver.php?zig=".urlencode($_GET['zig']);
header('Location: '.$url );
}
?>