[英]Redirect URL folder/directory in Joomla
I changed the "Alias" of a Joomla menu from我将 Joomla 菜单的“别名”从
нови-електромотори/
нови-електромотори/
to just只是
нови/
нови/
How can I redirect the old URLs containing "нови-електромотори/" and fetched by Google to "нови/"?如何将包含“нови-електромотори/”并由 Google 提取的旧 URL 重定向到“нови/”?
I tried with this, but it did not work.我试过这个,但它没有用。
RewriteEngine On
RewriteRule ^нови-електромотори/?$ $1/нови/$2 [R=301,L]
Also tried with Joomla redirect managed, but unsuccessfully.还尝试使用 Joomla 重定向管理,但未成功。
Using mod_alias is even easier:使用 mod_alias 更容易:
Redirect 301 /old /new
But if you have rewrite rules in your htaccess file already, then you need to stick with using mod_rewrite:但是,如果您的 htaccess 文件中已经有重写规则,那么您需要坚持使用 mod_rewrite:
RewriteRule ^old/(.*)$ /new/$1 [L,R=301]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.