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
301.htaccess使用两个单独的URL重定向_.htaccess_Url_Redirect - Fatal编程技术网

301.htaccess使用两个单独的URL重定向

301.htaccess使用两个单独的URL重定向,.htaccess,url,redirect,.htaccess,Url,Redirect,我想把URL重定向到这两者 example.com/new-old.php 及 当用户转到 example.com/new 如何操作?您可以在root.htaccess中使用此301规则: RedirectMatch 301 ^/(new)-(old|feb)/?$ /$1 固定格式和澄清。 RedirectMatch 301 ^/(new)-(old|feb)/?$ /$1

我想把URL重定向到这两者

example.com/new-old.php

当用户转到

example.com/new


如何操作?

您可以在root.htaccess中使用此301规则:

RedirectMatch 301 ^/(new)-(old|feb)/?$ /$1

固定格式和澄清。
RedirectMatch 301 ^/(new)-(old|feb)/?$ /$1