• [WP 4.8.1, WooCommerce, Wp SuperCache]
    Hi,

    I have a site with custom path homepage url, eg.
    instead domain.com home page url redirects to domain.com/custom-path

    Wordpress is installed in webroot directory. It’s just that homepage has a custom path instead of default webroot/domain url.

    It is done by 2 rewrite rules in .htaccess:

    # 301 due to filters off
    RewriteCond %{HTTP_HOST} !^www.domain.com(.*) [NC]
    RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]
    # 301 homepage
    RewriteCond %{QUERY_STRING} !^/?s=(.*) 
    RewriteRule ^$ /custom-path [R=301,L]

    and also by a filter added to functions.php (it removes default template redirects)
    remove_filter('template_redirect','redirect_canonical');

    We serve WP-Super Cache versions of urls to users. The trouble is that since custom path homepage url is in place we see more latency, and much longer server time response.

    I fear that Super Cache somehow gets confused which page to serve causing latency in homepage cache serving. Other website pages do not have this latency – we monitor it.

    Now the question: Is there latency friendly way of implementing custom path hompage url which would not cause delay in loading homepage cache? Could anyone put me int right direction?

  • The topic ‘Custom Path HomePage URL’ is closed to new replies.