简体   繁体   English

HTAcess中的URL重写不适用于带有参数的URL

[英]URL Rewrite in HTAcess Does Not Work for URL with Parameter

I mistakenly added %2Fi in my URL- 我错误地在%2Fi中添加了%2Fi

Expected URL: domainame.com/meaning/kannada/xxxxx 预期的网址: domainame.com/meaning/kannada/xxxxx
Current Wrong URL: domainame.com/meaning/kannada%2Fi/xxxxx 当前错误的URL: domainame.com/meaning/kannada%2Fi/xxxxx

Now, it has been indexed by Google, and when I see it in my webmaster tool, it shows approximately 4325 URLs with 404 . 现在,它已被Google索引,当我在网站管理员工具中看到它时,它会显示大约4325个URL和404 Now, I would like to add 301 redirection for those URLs. 现在,我想为这些URL添加301重定向。 I tried in my HTAccess, but it did not work. 我在HTAccess中尝试过,但是没有用。

I need- if the URL structure is domainame.com/meaning/kannada%2Fi/ , then it must be changed to domainame.com/meaning/kannada/ . 我需要-如果URL结构为domainame.com/meaning/kannada%2Fi/ ,则必须将其更改为domainame.com/meaning/kannada/

Show us how your redirection in .htaccess looks like, but that should work: 向我们展示您在.htaccess的重定向的样子,但这应该可以工作:

# Permanent URL redirect
Redirect 301 /meaning/kannada%2Fi/xxxxx http://domainame.com/meaning/kannada/xxxxx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM