• Resolved bk683

    (@bk683)


    I have a wordpress site at example.com. WordPress is installed to example.com/wordpress. When I visit example.com I see my blog. When I click on a post, I see that post in the form : https://example.com/2016/03/11/example-post/. This site is in Klingon language, for example.

    I have another wordpress installation in example.com/en. This site is in English language, obviously. This installation is completely separate from Klingon installation.

    I want to make a front page in example.com. In this page I will show two options: Klingon and English. Visitor will click to one of them, and will go to respective site.

    For this purpose I want to move my Klingon installation to example.com/kg address.

    But it is important for me to not lose existing links from other pages and search engines to my current Klingon site. Therefore I want current address form of https://example.com/2016/03/11/example-post/ to be redirected to https://example.com/kg/2016/03/11/example-post/.

    Is this possible, and how, please?

Viewing 3 replies - 1 through 3 (of 3 total)
  • In my experience it cannot change if you redirect it all of your link will error,, if you want your permailink like that you must change it in first your bloging start

    Thread Starter bk683

    (@bk683)

    Well, I made some progress.

    I renamed my example.com/wordpress directory to example.com/kg

    I changed in Admin/General page site url from example.com/wordpress to example.com/kg

    I used “Search and Replace” plugin and changed example.com/wordpress entries to example.com/kg in all my tables, to fix broken uploads, links etc.

    Now redirection works. But automatic redirection based on language does not. Let me explain.

    example.com/kg is my Klingon site.
    example.com/en is my English site.
    example.com/2016/03/11/example-post/ is displayed in Klingon. This means existing links from other sites will still work.

    However, my current problem:

    I cannot give my visitors the option to manually choose their language when they directly access to example.com.

    I thought that it would be better to implement automatic redirection based on their language. So I used this php code to make automatic redirection. Automatic redirection works, with a little adaptation: I changed

    include("index_en.php");

    codes to

    require( dirname( __FILE__ ) . '/en/wp-blog-header.php' );

    However, posts and pages are broken now. None of them can be found.

    Can you guide me from this point, please?

    Thread Starter bk683

    (@bk683)

    I have found a solution here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Move WordPress directory with redirection’ is closed to new replies.