Title: Redirection problem, broken links
Last modified: August 30, 2016

---

# Redirection problem, broken links

 *  [weigertj](https://wordpress.org/support/users/weigertj/)
 * (@weigertj)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/)
 * Hello,
 * unfortunately I have this (or a similar) problem mentioned here:
 * [https://wordpress.org/support/topic/redirection-problem-20?replies=3](https://wordpress.org/support/topic/redirection-problem-20?replies=3)
 * I have a few broken links reported by broken link checkers. If I tick _language
   client cookie “qtrans\_front\_language”_, the broken links are not reported anymore,
   however I cannot switch to the (default) english homepage again.
 * So when I untick _language client cookie “qtrans\_front\_language”_, I have redirection
   problem for a few links but there is a variation regarding the languages – probably
   because of the reason outlined by gurumance.
 * For example (on my [http://www.weigertimages.com](http://www.weigertimages.com)
   site):
 * there is a problem with this link:
 * _/photo/portrait-fashion-photography/_
 * I copy this link from Firefox where I use WordPress to IE
 * and I get a redirect, which is broken:
 * _/de/photo/portrait-fashion-photography/_
 * First of all, I don’t need a redirect, but the correct link would be this:
 * _/de/foto/portrait-mode-fotografie/_
 * In Chrome I get a broken redirect to the Hungarian version.
    For this above mentioned
   link only Hungarian and English are reported to be broken but for another link(/
   photo/destination-wedding-photography/) all 3 languages are reported and for 
   the third link only the English version (/photo/travel-photos/). Of course most
   links are fine, I have troubles with only these 3 links (wedding, portrait, travel).
 * Thanks for your help in advance.
 * [https://wordpress.org/plugins/qtranslate-slug/](https://wordpress.org/plugins/qtranslate-slug/)

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/topic/redirection-problem-broken-links/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/redirection-problem-broken-links/page/2/?output_format=md)

 *  Plugin Author [Pedro Carvalho](https://wordpress.org/support/users/pedroghandi/)
 * (@pedroghandi)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881423)
 * Hi weigertj, thanks for the bug report!
 * i can’t figure why those specific links are being wrongly redirected.
 * if you create a new post, does it have the same problem? are those old links?
 *  Thread Starter [weigertj](https://wordpress.org/support/users/weigertj/)
 * (@weigertj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881424)
 * Hi Pedro, I have this problem with 3 old links but not all old links show this
   phenomenon. I don’t have this problem with a page created recently.
 * I deleted a problematic page and recreated it with the same values. Unfortunately
   it shows the same thing. I don’t know whether this comes up as a real problem
   at browsing, or not. However, broken link checkers show it.
 * Thanks, anyway!
 *  Plugin Author [Pedro Carvalho](https://wordpress.org/support/users/pedroghandi/)
 * (@pedroghandi)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881425)
 * i see… it’s a puzzle 😐
 *  [gurumance](https://wordpress.org/support/users/gurumance/)
 * (@gurumance)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881442)
 * I still have this problem, and this is big issue if one wants their site to be
   recognized by google. The problem you described is like mine i think everyone
   has this problem, problem is wordpress and there has to be solution why cause
   wordpress add the hreflang link /da /de /mk /fr in front of the link and you 
   get 404 error
    weigertj you can test and see that the same thing happen if you
   use google search engine you write
 * your niche and sitename in search bar
 * you get the links to your posts before hittin one of them open your site in a
   new tab and change the language to be different than the one you searched your
   niche on google get back to search tab and hit the link you will get 404 error
   cause the new link will open with latest hreflang language you handpicked.
 *  Plugin Author [Pedro Carvalho](https://wordpress.org/support/users/pedroghandi/)
 * (@pedroghandi)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881443)
 * Hi everyone!
 * yep, that’s a big issue for me too, but i don’t think is related to hreflang.
 * 1. user visits the site
    – qtranslate-x sets cookie for lang “mk”
 * 2. user clicks in a link to a different language ( google, in facebook etc )
   –
   site.com/de/slug-de
 * 3. error because it tries to find site.com/mk/slug-de
 * Solutions?
 * 1- reset the cookie.
 * 2- parse the cookie first, then redirect. <– how?
 * any ideias?
 *  [gurumance](https://wordpress.org/support/users/gurumance/)
 * (@gurumance)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881444)
 * I give one clue .htaccess but how i don’t know 😛
    Pedro i said it was fixed 
   few months ago but after few more tests i noticed i was wrong.
 * Somehow we need to tell wordpress that if one hits /fr/postname he need to get
   to the link /fr/postname not get redirected to /com/postname in different language
 *  Plugin Author [Pedro Carvalho](https://wordpress.org/support/users/pedroghandi/)
 * (@pedroghandi)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881445)
 * yes, I was wrong too 🙂
 * well, if we don’t redirect, people that want to change language can’t do that.
 *  [gurumance](https://wordpress.org/support/users/gurumance/)
 * (@gurumance)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881446)
 * i have site where i can test all of it without worry that something will go bad
   so if any ideas need testing i am here to try n help
 *  Thread Starter [weigertj](https://wordpress.org/support/users/weigertj/)
 * (@weigertj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881447)
 * Hello gurumance,
 * I also checked the google search behavior and I have the same phenomenon.
    I 
   am not sure about this but may this be related to this problem?
 * [http://qtranslate-x.com/support/index.php?PHPSESSID=r42ovsu9h0uiqvooim4l1hu8t7&topic=239.0](http://qtranslate-x.com/support/index.php?PHPSESSID=r42ovsu9h0uiqvooim4l1hu8t7&topic=239.0)
 * May this be a theme-related problem?
    By the way, I also heard that qTranslate-
   X wants to integrate slug translation but it’s not working, yet.
 *  Plugin Author [Pedro Carvalho](https://wordpress.org/support/users/pedroghandi/)
 * (@pedroghandi)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881448)
 * Hi! So, I was working on this issue, and I was able to fix it!!
 * Please, can you both test the latest code on github?
 * [https://github.com/not-only-code/qtranslate-slug](https://github.com/not-only-code/qtranslate-slug)
 * i really appreciate it 🙂
 * terms are still not translating right, but custom posts, pages and posts are.
 * There’s one difference now: if the user was on the main language and clicked 
   on a link to a secondary link, the page will show in the secondary language.
 * later on, I’ll make sure it stays in the main language.
 * There’s no problem if the user was on secondary language and clicked on a link
   in main language. it will show the link in the secondary language.
 * let me know how if its fixed for you!
 * p.
 *  Thread Starter [weigertj](https://wordpress.org/support/users/weigertj/)
 * (@weigertj)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881449)
 * Hi Pedro Carvalho,
 * I quickly tested it on a few pages, but it didn’t work for me. Only the main 
   English site was fine, all the Hungarian and German pages gave me 404 error (
   the proper link was displayed in the main browser – and it wasn’t redirected).
   I also tested it with a Free Broken Link Checker and it showed me the broken 
   pages.
    After I restored the original file, I had to clear the browser cache.
 *  [gurumance](https://wordpress.org/support/users/gurumance/)
 * (@gurumance)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881450)
 * i tested it on test site and it seems to work there but in order to test more
   i need to update it on the second site but i don’t know the safest way to update
   i tried deleting and updating the plugin but that way i lost all post tag category
   slug translations so i had to restore from backup
 *  [gurumance](https://wordpress.org/support/users/gurumance/)
 * (@gurumance)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881457)
 * If it helps i removed language Widget and used added language changer to menu(
   q-translate-x). Tested several links and something strange happened link opens
   on the language requested wordpress add the slash /fr/englishslug but no 404 
   error it opens the link in french language for this example if i change language
   with language switcher from menu it changes to for example english without /en/
   to englishslug then if i go back to french language via language switcher link
   opens with /fr/frenchslug – that was just for testing but before(when the language
   switcher was in widgets) i used to get page not found ….
 * hope it helps
    🙂
 *  Plugin Author [Pedro Carvalho](https://wordpress.org/support/users/pedroghandi/)
 * (@pedroghandi)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881458)
 * Hi weigertj, gurumance, thank you so much for testing and sorry for the troubles
   you got 😐
 * i guess i need to work a little more on this problem.
 * stay in touch,
    p,
 *  Thread Starter [weigertj](https://wordpress.org/support/users/weigertj/)
 * (@weigertj)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/redirection-problem-broken-links/#post-6881459)
 * Hi Pedro,
 * you are welcome! Good luck with it!

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/topic/redirection-problem-broken-links/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/redirection-problem-broken-links/page/2/?output_format=md)

The topic ‘Redirection problem, broken links’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate-slug_5fb35e.svg)
 * [Qtranslate Slug](https://wordpress.org/plugins/qtranslate-slug/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate-slug/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate-slug/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate-slug/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate-slug/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate-slug/reviews/)

 * 24 replies
 * 3 participants
 * Last reply from: [weigertj](https://wordpress.org/support/users/weigertj/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/redirection-problem-broken-links/page/2/#post-6881468)
 * Status: not resolved