• On a hosting account I have the domains brasseria .nl and frieteria .nl. Brasseria is the main website, so everybody that visits frieteria should be redirected to brasseria. I use the following rewrite rule to do that:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^(www\.)?brasseria\.nl$ [NC]
    RewriteRule ^https://www.brasseria.nl%{REQUEST_URI} [L,R=301]
    </IfModule

    This rule works with WPFC disabled, but it stops working as soon as I enable WPFC.

    How can this be fixed? I really need this simple rewrite rule to redirects all domains that are not the main domain, because I also have websites with many more ‘old’ domains pointing to them, and I don’t really want to list all the pointers individually.

    Thanks
    JP

    Update:

    I did a bit more testing and found that two out of six http/www possible requests are not correctly redirected with WPFC enabled:

    Not redirected to https://www.brasseria.nl
    www.frieteria.nl
    https://www.frieteria.nl

    Correctly redirected to https://www.brasseria.nl
    frieteria.nl
    https://frieteria.nl
    https://frieteria.nl
    https://www.frieteria.nl

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Emre Vona

    (@emrevona)

    I could not understand. Why do you need to use a cache plugin if the site was redirected? You don’t even need to install WordPress.

    The (main) site is not redirected. This is the situation:

    1. The restaurant owns multiple domains.
    2. One domain is for their actual website that needs caching.
    3. The other domains are for the previous name(s) of that restaurant from before the current owner took over. They keep them, because these old domains are still used in many restaurant listings across the internet. These old domains are redirected to their current domain because they still bring in traffic through all these online listings.

    Hi @jpnl,

    I support what Emre indicated. The issue is not with WPFC, it’s with your set-up.

    Food for thought:

    1. As a test, delete your .htaccess redirect rule and, instead, install Rank Math (my choice) which has a redirect feature. You can also use Yoast or any other reputable plugin that focuses on redirecting sites. After completing your new set-up with one of these plugins, then activate WPFC. Result?
    2. Did the Restaurant try to update the old domain URLs to the new domain URL? (best for visitors’ UX and the main site’s SEO). In short, delete any references to frieteria.nl (complete clean-up) and replace it with brasseria.nl.
    3. Did you check the domain URL assigned to the affected website elements? For example, when I hover on Frieteria, the link assigned to it is Brasseria., instead of Frieteria. (details)

    Cheers!

    Hi @generosus thank you for your input, but then you probably didn’t read my reply to him.

    I disagree. The redirect rule works like a charm when WPFC is disabled, meaning that WPFC does something that breaks a working redirect rule.

    1. It doesn’t make sense to install a plugin for redirecting stuff if can be done directly in .htaccess. The rule in .htaccess runs before WordPress runs, speed wise, that’s a much better idea. Also, Rank Math or any other redirect plugins are generally focussed on redirecting one page to another. That’s not what I can use here. What I need is that someone who tries to visit myolddomain.com is redirected to mynewdomain.com. If I don’t redirect them, both domains show the exact same (duplicate) content.
    2. That depends, but is unrelated to my question.

    Hi @jpnl,

    Here’s the best I can offer at this time:

    1. I recommend changing your old domains to the new domain and remove any references (elements) related to frieteria.nl from your new domain. Problem solved ??
    2. Check the below support topics. One of them is yours. They could shed some light on your issue and how to solve it.
    3. Purchase the Premium version of this plugin (worth it, I use it), then contact the developer for an in-depth review of your issue.

    Best wishes.

    Support Topics:

    https://www.ads-software.com/support/topic/wp-fastest-cache-redirects-page-to-wp-content-cache-folder/
    https://www.ads-software.com/support/topic/no-https-redirect-on-cached-sites/

    Disclaimer:

    I’m not affiliated with this plugin nor the developer. Simply offering goodwill support.

    Thanks @generosus

    1. Is already done, of course. That’s the whole point.
    2. I know my own tickets. That one was a whole different issues. And yes I tested that method again before posting a new ticket.
    3. That would be an option. Solved it though with a minor change in the rule (see next reply).

    Problem solved with a change in the redirect rule. This one works correctly with and without WPFC.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^(www\.)?brasseria\.nl [NC]
    RewriteRule ^(.*)$ https://www.brasseria.nl/$1 [L,R=301,NC]

    Awesome. Good catch.

    So, as stated before: “The issue is not with WPFC, it’s with your set-up.”

    Cheers!

    Still disagree. If a rule works without WPFC and stops working with WPFC, then it’s definitely WPFC that breaks it.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.