Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 从一个地址重定向到另一个地址_.htaccess - Fatal编程技术网

.htaccess 从一个地址重定向到另一个地址

.htaccess 从一个地址重定向到另一个地址,.htaccess,.htaccess,我想将$WORKID_地址重定向到$home_地址,例如: $WORKID_address=“” $home_address=“” 我尝试了很多不同的可能性: 1. RewriteRule "https://homepage.com/?val=search&bname=&town=Yanziyan&country=China&ll=on&full=full&ss=1" "https://homepage.com/" [R=301,L] 2. Re

我想将$WORKID_地址重定向到$home_地址,例如:

$WORKID_address=“”

$home_address=“”

我尝试了很多不同的可能性:

1. RewriteRule "https://homepage.com/?val=search&bname=&town=Yanziyan&country=China&ll=on&full=full&ss=1" 
"https://homepage.com/" [R=301,L]
2. RewriteRule "^/\?val=search\&bname=\&town=Yanziyan\&country=China\&ll=on\&full=full\&ss=1$" 
    "https://homepage.com/" [R=301,L]
3. RewriteRule "^(.*)China(.*)$" 
    "https://homepage.com/" [R=301,L]
4. Redirect 301 "https://homepage.com/?val=search&bname=&town=Yanziyan&country=China&ll=on&full=full&ss=1" 
"https://homepage.com/" "https://homepage.com/"

还有更多。。但一切都没有奏效。我的问题是如何重定向该链接?我在互联网上做过研究,但什么也没发现。

很难说你到底想做什么,但结果是:


你收到错误消息了吗?

我没有收到错误消息,这没有任何作用
重定向/?val=search&bname=&town=Yanziyan&country=China&ll=on&full=full&ss=1https://homepage.com
Redirect /path/to/old.html http://www.example/path/to/new.html
Redirect /path/to/old.html /path/to/new.html