Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/230.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 在Joomla中使用通配符重定向_Php_Redirect_Joomla - Fatal编程技术网

Php 在Joomla中使用通配符重定向

Php 在Joomla中使用通配符重定向,php,redirect,joomla,Php,Redirect,Joomla,我在joomla上,joomla中有一个重定向组件,我可以在其中输入源URL和目标URL。我想要达到的是 www.mysite.com/index.php/community/profile/1005 应该重定向到 www.mysite.com/index.php/connect/profile/1005 这里的问题是数字“1005”是一个变量,并且随着配置文件的变化而不断变化。我试过了 来源:www.mysite.com/index.php/connect/profile/(*) 目的地:ww

我在joomla上,joomla中有一个重定向组件,我可以在其中输入源URL和目标URL。我想要达到的是

www.mysite.com/index.php/community/profile/1005

应该重定向到

www.mysite.com/index.php/connect/profile/1005

这里的问题是数字“1005”是一个变量,并且随着配置文件的变化而不断变化。我试过了 来源:www.mysite.com/index.php/connect/profile/(*) 目的地:www.mysite.com/index.php/connect/profile/$1


但它不起作用。我们将非常感谢您的帮助

我认为您要做的是使用一个正则表达式来更改从“www.mysite.com/index.php/community/profile/”开始的所有URL。这并不是很难,你应该把它添加到你的htaccess中。查看本指南:

我认为您需要做的是使用正则表达式更改所有URL,从“www.mysite.com/index.php/community/profile/”开始。这并不是很难,你应该把它添加到你的htaccess中。查看本指南:

您可能想查看您可能想查看这是一个好问题,但我花了几天时间尝试向Joomla提供的.htaccess文件添加重定向,这确实很难做到。说向htaccess添加重定向“不是很难”并不是一个答案。这是一个好问题,但我花了几天时间试图向Joomla提供的.htaccess文件添加重定向,这确实很难做到。说向htaccess添加重定向“不是很难”并不是一个答案。