Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/279.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
如何将PHP页面重定向到FTP服务器中新文件夹内的另一个PHP页面?_Php_.htaccess_Mod Rewrite_Redirect_Ftp - Fatal编程技术网

如何将PHP页面重定向到FTP服务器中新文件夹内的另一个PHP页面?

如何将PHP页面重定向到FTP服务器中新文件夹内的另一个PHP页面?,php,.htaccess,mod-rewrite,redirect,ftp,Php,.htaccess,Mod Rewrite,Redirect,Ftp,您好,我需要重定向此php页面: wwd_energy-efficiency.php 此文件位于主视图文件夹中 指向此url路径: http://www.domain.com/renewable-energy/energy-efficiency 在这个路径中,我创建了一个新的目录文件夹“可再生能源”,复制了wwd_energy-efficiency.php,然后将其重命名为energy-efficiency 我使用了3种类型的重定向-没有任何效果 (1).htaccess RewriteEn

您好,我需要重定向此php页面:

wwd_energy-efficiency.php
此文件位于主视图文件夹中

指向此url路径:

http://www.domain.com/renewable-energy/energy-efficiency
在这个路径中,我创建了一个新的目录文件夹“可再生能源”,复制了wwd_energy-efficiency.php,然后将其重命名为energy-efficiency

我使用了3种类型的重定向-没有任何效果

(1).htaccess

RewriteEngine On

RewriteRule ^wwd_energy-efficiency\.php$ http://www.domain.com/renewable-energy/energy-efficiency [L,R=301]
返回404

(2)php标题

<?php
header("Location: renewable-energy/energy-efficiency.php");
?>


返回404

**(3) 元**


返回404


我猜重定向可能不是问题,或者在FTP服务器中创建文件夹时是否有错误?我现在不太确定。请帮忙

当您在浏览器的位置输入url“”时,该url是否有效?@Starkeen否,它不起作用。:/但是文件夹“可再生能源”和“能源效率”php文件在服务器中folder@JustinIurman哦,这就是为什么。好的,谢谢!我只需联系我们的服务器所有者:)
<?php
header("Location: http://www.domain.com/renewable-energy/energy-efficiency");
?>
<META http-equiv="refresh" content="0; URL=http://www.domain.com/renewable-energy/energy-efficiency">