Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/231.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
URL 301重定向蛋糕PHP_Php_Cakephp_Seo_Url Redirection - Fatal编程技术网

URL 301重定向蛋糕PHP

URL 301重定向蛋糕PHP,php,cakephp,seo,url-redirection,Php,Cakephp,Seo,Url Redirection,我只是想知道我在.htaccess文件中为301重定向使用了什么代码 我的旧URL是,我想在上重定向它 我在app/.htaccess和app/webroot/.htaccess中都试过这段代码 Redirect 301 /training/certified-ethical-hacker-v9-course /ec-council/certified-ethical-hacker-v9-course 这将重定向您的页面 搜索引擎是不同的东西。谷歌为你的旧链接编制索引,并在搜索引擎上搜索时显示

我只是想知道我在.htaccess文件中为301重定向使用了什么代码

我的旧URL是,我想在上重定向它

我在app/.htaccess和app/webroot/.htaccess中都试过这段代码

Redirect 301 /training/certified-ethical-hacker-v9-course /ec-council/certified-ethical-hacker-v9-course
这将重定向您的页面


搜索引擎是不同的东西。谷歌为你的旧链接编制索引,并在搜索引擎上搜索时显示你的旧链接。要从Google网站管理员工具中删除Google索引中的旧链接,应添加410 Goe标题,以便当Google bot爬行时,它会注意到索引页已消失。

它正在工作。当我点击你的旧网址。它将我重定向到新的URL。但不适用于搜索引擎…但它显示302重定向,这是临时重定向…你是什么意思
但不适用于搜索引擎。
我的意思是。。当我在与我公司网站相关的搜索引擎上搜索时,它会显示带有404错误的旧URL。但如果我点击它,它会重定向到新的URL。
RedirectMatch 301 ^/training/certified-ethical-hacker-v9-course /ec-council/certified-ethical-hacker-v9-course