• Hello. I found out every redirect from the secondary domain in a website takes visitors to the corresponding page in /wp-content/cache/all/.

    I’ve tried the secondary domain using http and https, and also with and without www.

    In the .htaccess file, after the Fastest Cache part and before de WordPress part, I have this:

    
    # END LBCWpFastestCache
    RewriteEngine on
    
    <IfModule mod_headers.c>
    	Header set X-XSS-Protection "1; mode=block"
    	Header set X-Frame-Options SAMEORIGIN
    	Header set X-Content-Type-Options nosniff
    	Header unset X-Powered-By
    </IfModule>
    
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [E=HTTPS,R=301,L]
    
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS
    
    RewriteCond %{HTTP_HOST} ^domain.com.uy$ [OR]
    RewriteCond %{HTTP_HOST} ^www.domain.com.uy$
    RewriteRule ^(.*)$ "https\:\/\/www\.domain\.com\/$1" [R=301,L]
    
    # BEGIN WordPress
    

    Any ideas?

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

    (@emrevona)

    you need to update the 301 redirection rules as below.
    https://www.wpfastestcache.com/tutorial/redirection-to-wp-contentcacheallindex-html-problem/

    # END LBCWpFastestCache
    RewriteEngine on
    
    <IfModule mod_headers.c>
    	Header set X-XSS-Protection "1; mode=block"
    	Header set X-Frame-Options SAMEORIGIN
    	Header set X-Content-Type-Options nosniff
    	Header unset X-Powered-By
    </IfModule>
    
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{REQUEST_URI} !wp-content\/cache\/(all|wpfc-mobile-cache)
    RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [E=HTTPS,R=301,L]
    
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !wp-content\/cache\/(all|wpfc-mobile-cache)
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS
    
    RewriteCond %{HTTP_HOST} ^domain.com.uy$ [OR]
    RewriteCond %{HTTP_HOST} ^www.domain.com.uy$
    RewriteCond %{REQUEST_URI} !wp-content\/cache\/(all|wpfc-mobile-cache)
    RewriteRule ^(.*)$ "https\:\/\/www\.domain\.com\/$1" [R=301,L]
    
    # BEGIN WordPress
    • This reply was modified 4 years, 8 months ago by Emre Vona.
Viewing 1 replies (of 1 total)
  • The topic ‘Secondary domain redirects to wp-content/cache/all/’ is closed to new replies.