mismatchedpear
Member
Posted 2 years ago #
Here's the page I'm working with:
http://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 http://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!
mismatchedpear
Member
Posted 2 years ago #
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!!!
mismatchedpear
Member
Posted 2 years ago #
Here is the code I'm using
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.jaspry.com$ [NC]
RewriteRule ^(.*)$ http://jaspry.com/$1 [R=301,L]
mismatchedpear
Member
Posted 2 years ago #
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!