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_Dns - Fatal编程技术网

.htaccess 域重定向到路径稍有修改的其他域

.htaccess 域重定向到路径稍有修改的其他域,.htaccess,dns,.htaccess,Dns,所以我想重定向 domain2.com/path/url到另一个域,domain1.com/pathDurl,其中/被D或其他字符替换 这可能吗?您可以在/domain2/.htaccess中使用以下重定向: RedirectMatch 302 ^/path/(.+)$ http://domain1.com/pathD$1 这将重定向: 到

所以我想重定向

domain2.com/path/url到另一个域,domain1.com/pathDurl,其中/被D或其他字符替换


这可能吗?

您可以在/domain2/.htaccess中使用以下重定向:

RedirectMatch 302 ^/path/(.+)$ http://domain1.com/pathD$1
这将重定向: