WordPress.org

Ready to get started?Download WordPress

Forums

WWW redirect conflict with WP (3 posts)

  1. johnmath777
    Member
    Posted 5 years ago #

    I recently created a .htaccess file to redirect all incoming traffic coming from example.com to redirect to http://WWW.example.com. However this causes a redirect loop error with Word Press. Whenever I try to view a specific blog I get this error. Also, when I try to log on my WP Cpanel it wont allow me to.

    The WP folder and the .htaccess file are located in the root directory with the index file.

    This is the actual error I get when trying to get into a specific blog http://deadutopia.com/blog/?cat=4

    Looks like to me since its missing the WWW the redirect code runs into issues trying to redirect to http://WWW.deadutopia.com/blog/?cat=4

    I’ve searched the forums and cant find a solution to this particular redirect issue. Can anyone help?
    thanx

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    WordPress uses canonical URLs. Meaning that it will redirect to the URLs it expects you do be on, if you're not on them. Meaning that you had better make sure that the two URLs on the Settings->General page look the way you want them to look.

  3. scribu
    Member
    Posted 5 years ago #

    WordPress will automatically enforce www or no www based on the site url you set in the General Settings page, so you don't have to add anything to your .htaccess.

Topic Closed

This topic has been closed to new replies.

About this Topic