简体   繁体   中英

URL Rewrite in HTAcess Does Not Work for URL with Parameter

I mistakenly added %2Fi in my URL-

Expected URL: domainame.com/meaning/kannada/xxxxx
Current Wrong 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 . Now, I would like to add 301 redirection for those URLs. I tried in my HTAccess, but it did not work.

I need- if the URL structure is domainame.com/meaning/kannada%2Fi/ , then it must be changed to domainame.com/meaning/kannada/ .

Show us how your redirection in .htaccess looks like, but that should work:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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