WordPress.org

Ready to get started?Download WordPress

Forums

htaccess edited, result 301 error (2 posts)

  1. carpe
    Member
    Posted 7 years ago #

    I am a newbie, please help. I do not know if I will make myself clear...

    I asked my web host how come google couldn't index my site as it is going back to my old directory (http://quotesincan.com/blog)after changing it to my main root under WWW

    http://quotesincan.com/ or http://www.quotesincan.com/ ( i don't know what is the difference between the two.

    Now...they replied that i should edit my htaccess with this :

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !quotesincan.com/blog$ [NC]
    RewriteRule ^(.*)$ http://quotesincan.com/$1 [L,R=301]

    AFter doing that...

    No browser could access my site and I had it validated, I got a 301 error.

    What will I do now?

    Thank you for giving time to help me.

  2. AskApache
    Member
    Posted 7 years ago #

    If you want your site to be http://www.quotesincan.com instead of http://quotesincan.com then do this.

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www\.quotesincan\.com$ [NC]
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    Be sure to keep your WordPress htaccess directives though!

    See this htaccess article

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags