• Resolved mismatchedpear

    (@mismatchedpear)


    Here’s the page I’m working with:

    https://www.jaspry.com

    I wanted to do something so simple. I copy/pasted a code into my .htaccess file to ALWAYS add “www.” because there are duplicate domains: jaspry.com and https://www.jaspry.com.

    When I copy/pasted the .htaccess code (and changed example.com to jaspry.com) it did the OPPOSITE. It removed “www.” when I typed it in, and then my WordPress Pages stopped working! It gives me a 404 error!

    So I deleted the code, refreshed my cache, and it’s still doing the same thing!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mismatchedpear

    (@mismatchedpear)

    Not Found

    The requested URL /about/ was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I tried a mod_rewrite code to REMOVE .www ; just incase it could work (I’ll take any rewrite rule to either ADD or REMOVE www. , I just don’t want both!)

    When I click on a link that contains WWW. it correctly removes the www. in the address bar… But it still shows the 404 error as quoted above. So now I think I got the problem fixed OTHER than the fact that WordPress isn’t creating my /about/ page!!!

    Thread Starter mismatchedpear

    (@mismatchedpear)

    Here is the code I’m using

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.jaspry.com$ [NC]
    RewriteRule ^(.*)$ https://jaspry.com/$1 [R=301,L]

    Thread Starter mismatchedpear

    (@mismatchedpear)

    Somehow I fixed it.

    I must have deleted a line of code in HTaccess file.

    I copy pasted this and it worked:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %

    {REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    I don’t even know what all that does, but it worked!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress pages got eaten by mod_rewrite!’ is closed to new replies.