Wordpress: “wp-admin-canonical” gets wrong URL, causing links inside wp-admin to use root instead of sub-directoryhome_url() links in wordpress site is getting redirected to some other urlCannot login to wordpress admin once i change the admin urlWordpress with my siteLoading index.php contents which located outside blog folder for post single pageWordpress Redirecting Non Category Pages /page/nnn to their Canonical URLsMoving Wordpress site to /blog domainApache Reverse Proxy to a Wordpress site passes subpath when it shouldn'tHow could Laravel mirror another site hosted on the same server?Sub-domain as sub-directory in URLHref Attribute Linked To Wrong Url in CodeIgniter

What is this symbol: semicircles facing each other?

SQL Server Management Studio - Why is Dark Theme Disabled by Default?

What to say to a student who has failed?

Why did Khan ask Admiral James T. Kirk about Project Genesis?

Why do gliders have bungee cords in the control systems and what do they do? Are they on all control surfaces? What about ultralights?

I don't have the theoretical background in my PhD topic. I can't justify getting the degree

Is it possible to perform a regression where you have an unknown / unknowable feature variable?

How to determine car loan length as a function of how long I plan to keep a car

“T” in subscript in formulas

A discontinuity in an integral

Numbers Decrease while Letters Increase

Was there ever a treaty between 2 entities with significantly different translations to the detriment of one party?

State-of-the-art algorithms for solving linear programs

How to gently end involvement with an online community?

Are the players on the same team as the DM?

Heyacrazy: Careening

If all stars rotate, why was there a theory developed that requires non-rotating stars?

How to make Ubuntu support single display 5120x1440 resolution?

Avoiding racist tropes in fantasy

What are some interesting features that are common cross-linguistically but don't exist in English?

Pythagorean triple with hypotenuse a power of 2

Is there any method of inflicting the incapacitated condition and no other condition?

LeetCode: Group Anagrams C#

Tensorflow - logistic regrssion -oneHot Encoder - Transformed array of differt size for both train and test



Wordpress: “wp-admin-canonical” gets wrong URL, causing links inside wp-admin to use root instead of sub-directory


home_url() links in wordpress site is getting redirected to some other urlCannot login to wordpress admin once i change the admin urlWordpress with my siteLoading index.php contents which located outside blog folder for post single pageWordpress Redirecting Non Category Pages /page/nnn to their Canonical URLsMoving Wordpress site to /blog domainApache Reverse Proxy to a Wordpress site passes subpath when it shouldn'tHow could Laravel mirror another site hosted on the same server?Sub-domain as sub-directory in URLHref Attribute Linked To Wrong Url in CodeIgniter






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I've come across a weird problem where something with the URL settings is causing only /wp-admin/ to break inner links.



To elaborate; I am moving an installation from blog.example.com to example.com/folder/blog.



After changing the Wordpress siteurl to the new one, the front-end of the blog works perfectly fine as expected. After logging in to wp-admin at example.com/folder/blog/wp-admin; the URL in the browser changes to example.com/wp-admin and so do all the internal links in the admin panel.



Hence, clicking on any of the link doesn't work. However, if I manually add /folder/blog/ to the link; the page loads fine except the URL again changes back to root level.



I have identified this is happening through Javascript. Disabling Javascipt then means the page loads fine. Looking at the page markup, I found the following lines:



<link id="wp-admin-canonical" rel="canonical" href="http://example.com/wp-admin/" />
<script>
if ( window.history.replaceState )
window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );

</script>


If the value in the canonical was correct, it should have been http://example.com/folder/blog/wp-admin/



I have never encountered this before. Am I missing any reference I should be changing?



The server is using a ProxyPass; perhaps something missing with that?










share|improve this question
































    0















    I've come across a weird problem where something with the URL settings is causing only /wp-admin/ to break inner links.



    To elaborate; I am moving an installation from blog.example.com to example.com/folder/blog.



    After changing the Wordpress siteurl to the new one, the front-end of the blog works perfectly fine as expected. After logging in to wp-admin at example.com/folder/blog/wp-admin; the URL in the browser changes to example.com/wp-admin and so do all the internal links in the admin panel.



    Hence, clicking on any of the link doesn't work. However, if I manually add /folder/blog/ to the link; the page loads fine except the URL again changes back to root level.



    I have identified this is happening through Javascript. Disabling Javascipt then means the page loads fine. Looking at the page markup, I found the following lines:



    <link id="wp-admin-canonical" rel="canonical" href="http://example.com/wp-admin/" />
    <script>
    if ( window.history.replaceState )
    window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );

    </script>


    If the value in the canonical was correct, it should have been http://example.com/folder/blog/wp-admin/



    I have never encountered this before. Am I missing any reference I should be changing?



    The server is using a ProxyPass; perhaps something missing with that?










    share|improve this question




























      0












      0








      0








      I've come across a weird problem where something with the URL settings is causing only /wp-admin/ to break inner links.



      To elaborate; I am moving an installation from blog.example.com to example.com/folder/blog.



      After changing the Wordpress siteurl to the new one, the front-end of the blog works perfectly fine as expected. After logging in to wp-admin at example.com/folder/blog/wp-admin; the URL in the browser changes to example.com/wp-admin and so do all the internal links in the admin panel.



      Hence, clicking on any of the link doesn't work. However, if I manually add /folder/blog/ to the link; the page loads fine except the URL again changes back to root level.



      I have identified this is happening through Javascript. Disabling Javascipt then means the page loads fine. Looking at the page markup, I found the following lines:



      <link id="wp-admin-canonical" rel="canonical" href="http://example.com/wp-admin/" />
      <script>
      if ( window.history.replaceState )
      window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );

      </script>


      If the value in the canonical was correct, it should have been http://example.com/folder/blog/wp-admin/



      I have never encountered this before. Am I missing any reference I should be changing?



      The server is using a ProxyPass; perhaps something missing with that?










      share|improve this question
















      I've come across a weird problem where something with the URL settings is causing only /wp-admin/ to break inner links.



      To elaborate; I am moving an installation from blog.example.com to example.com/folder/blog.



      After changing the Wordpress siteurl to the new one, the front-end of the blog works perfectly fine as expected. After logging in to wp-admin at example.com/folder/blog/wp-admin; the URL in the browser changes to example.com/wp-admin and so do all the internal links in the admin panel.



      Hence, clicking on any of the link doesn't work. However, if I manually add /folder/blog/ to the link; the page loads fine except the URL again changes back to root level.



      I have identified this is happening through Javascript. Disabling Javascipt then means the page loads fine. Looking at the page markup, I found the following lines:



      <link id="wp-admin-canonical" rel="canonical" href="http://example.com/wp-admin/" />
      <script>
      if ( window.history.replaceState )
      window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );

      </script>


      If the value in the canonical was correct, it should have been http://example.com/folder/blog/wp-admin/



      I have never encountered this before. Am I missing any reference I should be changing?



      The server is using a ProxyPass; perhaps something missing with that?







      php wordpress proxy reverse-proxy proxypass






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 1 at 8:38







      AliIshaq

















      asked Mar 27 at 17:36









      AliIshaqAliIshaq

      4087 silver badges22 bronze badges




      4087 silver badges22 bronze badges

























          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55383403%2fwordpress-wp-admin-canonical-gets-wrong-url-causing-links-inside-wp-admin-to%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55383403%2fwordpress-wp-admin-canonical-gets-wrong-url-causing-links-inside-wp-admin-to%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현