• First of all, I would like to state that I came here because I spent the whole weekend not to disturb anyone about this subject, changed 3 hosting companies, re-installed the site, and finally admitted that I was helpless. I made all this effort to learn something on my own, although I learned a lot, but I could not achieve exactly what I wanted. Thanks in advance to anyone who might be willing to help me.

    First of all, I should mention that I have 2 domain names. (I have more but the first 2 are relevant to our topic)

    megabitcoin.blog: Connected with Cloudflare. My main domain and provided by a hosting company. WordPress installation is installed, I have no problems.

    uwwu.org : Purchased from wordpress.com. Connected with Cloudflare. Not on any hosting platform. The bare domain name.

    My purpose and goal:

    Simply this; When a user wants to go to megabitcoin.blog/category/lifestyle, they will automatically go to uwwu.org/category/lifestyle and see uwwu.org/* in the browser url line.

    But it is not that simple. Because my landing page is megabitcoin.blog. In order to perform the above operation, the user must click on the lifestyle tab that I set in the header menu. So if the user is not redirected from google search, he will not type the url by hand. He will click megabitcoin.blog/category/lifestyle with the mouse. Or click on one of the posts under the lifestyle category (WordPress category) on the homepage and go to megabitcoin.blog/lifestyle/*particular lifestyle related post.

    To achieve this goal, I have linked both domains to Cloudflare. Under megabitcoin.blog(cloudflare), I set Rules and Forwarding URL. The operation I did is: url required -> https://www.megabitcoin.blog/*/lifestyle/* -> forwarding URL 301 -> destination URL -> https://uwwu.org/lifestyle/*/*

    Isn’t this supposed to do what I expect above (It doesn’t)

    Then again, I went to the Bulk Redirects section under Cloudflare. To Create Bulk Redirect List – >
    Source Url: I wrote https://megabitcoin.blog/category/lifestyle
    I wrote the target url part: https://uwwu.org/category/lifestyle

    Because the user can go directly to the /lifestlye path (by clicking the post directly)
    source https://megabitcoin.blog/lifestyle
    301 Redirect
    target https://uwwu.org/lifestyle
    I added.`

    This process has worked before (on Godaddy). It doesn’t work on my current hosting service. So when I click megabitcoin.blog/lifestyle or /category/lifestyle, the browser url does not change to uwwu.org. (Yes, I am refreshing the browser cache)
    But when I manually type uwwu.org/lifestyle’, I can see that the browser url remains uwwu.org. Yet if I click on another lifestlye related post on this page, the url changes to megabitcoin.

    I don’t want to use redirecton as wordpress plugin. Because it only supports sending site root to another site root. Not sub folders.
    Also, we must remember that uwwu.org is not an installatin. It’s just a domain name! (Not backed by any host)

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey there,

    I would suggest adding this below code in the .htaccess file of megabitcoin.blog

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^megabitcoin.blog$ [OR]
      RewriteCond %{HTTP_HOST} ^www.megabitcoin.blog$
      RewriteRule (.*)$ http://www.uwwu.org/$1 [R=301,L]
    </IfModule>

    This will help you set the redirection to uwwu.org URLs properly.

    Thread Starter agarthan

    (@agarthan)

    Thank you Kishan Sonar for your interest.

    `The above code could have solved my problem with the .htaccess file.

    Because I learnt that I was doing some thing wrong in cloudflare URL forwarding (page rules section). I was missing the wildcard ie https://domain1/* to domain2/$1 redirect.

    I suggest reading the wilcard settings in the Cloudflare documentation in case anyone else has this problem.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘URL Forwarding or Redirection’ is closed to new replies.