WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Error 404 after htaccess – 301 redirect

[Resolved] Error 404 after htaccess – 301 redirect

  • I uploaded a .htaccess file to my WordPress root folder, with the following code.

    ========================================================
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]
    ========================================================
    My intent was to do canonical redirection, that is: redirect visitors from http://site.com to http://www.site.com

    Once I had the .htaccess file in place, except my homepage rest of the pages return a 404 error.

    Any help regarding this would be appreciated.

    My website: http://srikanth.techonaut.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would guess that you’ve over-written the code in the original .htaccess file that WordPress uses to make it’s permalinks.

    Go to your Control Panel > Settings > Permalinks and check your settings are correct. Then make sure you ‘Save Changes’ and it should update your .htaccess with the permalink code.

    An easy fix, thanks it helped.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Error 404 after htaccess – 301 redirect’ is closed to new replies.