Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/287.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中的htaccess重定向_Php_Regex_.htaccess - Fatal编程技术网

php中的htaccess重定向

php中的htaccess重定向,php,regex,.htaccess,Php,Regex,.htaccess,如何从www.example.com/dietitian/reema.verma.3重定向到www.example.com/dietitian//3?请帮忙 Options +FollowSymLinks RewriteEngine On Redirect www.example.com/dietitian/reema.verma.3 www.example.com/dietitian/#/3 您只能使用“重写规则”或“重定向”匹配请求\u URI 使用此规则: Options +Follow

如何从www.example.com/dietitian/reema.verma.3重定向到www.example.com/dietitian//3?请帮忙

Options +FollowSymLinks
RewriteEngine On
Redirect www.example.com/dietitian/reema.verma.3 www.example.com/dietitian/#/3
您只能使用“重写规则”或“重定向”匹配请求\u URI

使用此规则:

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^/?(dietitian)/.+\.(\d+)/?$ /project/$1/#/$2 [L,NC,NE,R=301]

你自己试过什么吗?是的。看,我只是编辑我的问题。但它不起作用。我把上面的代码放在.htaccess文件中。然后将.htaccess文件放在根文件夹中。它将从重定向到请建议执行的操作。否,现在它将重定向到“是”。伟大的谢谢阿努巴瓦你好,anubhava,请帮助我,现在要求有一些变化,我想从www.example.com/healthcare/practices/nikky.23转到www.example.com/healthcare/practices//nikky.23