• Resolved jurijsmsk

    (@jurijsmsk)


    Getting error in ahrefs for 301 redirect. So my guess is redirect everything to https://. If im not right, let me know ?? Since page is crawled with google not very smart to change structure of url, so… Anyways, even if my guess is right, cannot figure out how to do it propertly, not strong in redirects at all. Will appreciate suggestions or solution.

    View post on imgur.com

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # Rewrite HTTP to HTTPS
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
    </IfModule>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Sa?a

    (@stodorovic)

    You should move “HTTP to HTTPS” rules before WP rules. Also, SERVER_NAME could be different that Site URL in WP settings. You can try to replace %{SERVER_NAME} with Site URL.

    Thread Starter jurijsmsk

    (@jurijsmsk)

    doesnt solve the issue. ?? And y, server name was different, completely forgot…

    • This reply was modified 4 years, 6 months ago by jurijsmsk.
    Plugin Support devnihil

    (@devnihil)

    @jurijsmsk Unfortunately this forum is reserved for questions specific to supporting the Yoast SEO plugin. If you have a general question about htaccess or redirects we would recommend contacting your hosting provider, or posting in a forum dedicated to those topics. Thanks for your understanding.

    Thread Starter jurijsmsk

    (@jurijsmsk)

    What i paid for… Suggestions about how many keyphases incude in first paragraph?

    Ok

    Thread Starter jurijsmsk

    (@jurijsmsk)

    Solution was turn server “force https” and

    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*) https://domain.com/$1 [R=301,L]
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘htaccess 301 error’ is closed to new replies.