• I don’t get it. I tried everything, but my redirection from non-www to www just won’t work. The htaccess is correct, I tried a few variants and at the moment it looks like this:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^dreadfactory\.de$ [NC]
    RewriteRule ^(.*)$ https://www.dreadfactory.de/$1 [R=301,L]
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    It does not seem to matter where I place the rewrite, it is simply ignored. Well, not ignored, but the redirection seems to take place somewhere else. The redirection code is 302 eventhough I specified to use 301.

    I deactivated cache plugins to see if they were messing something up, but neither WP Super Cache nor WP minify seem to be responsible for the problem.

    Othe redirects (from .net to .de) are using 302 too, even if I put in the 301 part…

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi domnar! The problem could be a caching issue on your end. When I visit dreadfactory.de I am automatically redirected to the www version of your website. Try clearing your browser’s cache again and let us know how it goes!

    Thread Starter domnar

    (@domnar)

    I am redirected to the www version, but via 302 redirect. If I enter the non-www url in some “redirect checking tools” they all say the website is redirected via 302. But since this it horrible for SEO values I would like to change that to a 301 redirect.

    But no matter where I add the 301, it still uses 302.

    Hi domnar, I searched quite a bit on Google regarding this, and it seems everyone is using a plugin to help resolve this issue (rather than a .htaccess redirect). Have you thought about using a plugin, such as Redirection to help resolve this issue?

    Thread Starter domnar

    (@domnar)

    I actually have that plugin, however this seems not to help, or I’m just configuring it wrong :D)

    Whenn I put in “https://dreadfactory.de&#8221; as the source URL it gets converted to “/” which end up in a redirect loop when trying to access the site.

    If I just put in “dreadfactory.de” the plugin claims that this entry was hit >40 times, but when checking it still does not redirect with 301. :/

    Hi domnar, have you thought about the fact that there may be a plugin or code in your theme that is causing the problem? I just tested a wordpress site that I have and the www redirect is done with 301 successfully.

    You could possibly try temporary disabling plugins and / or switching to another theme to test.

    Thread Starter domnar

    (@domnar)

    Hi Brad, I just deactivated every plugin one by one and I switched Themes, but the result still remains was a 302 redirect every time. ??

    Is there a tool with which I could inspect the source of the redirect?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘301 htaccess ignored’ is closed to new replies.