htaccess not redirecting and displaying 404

Im wondering if someone could help me out.

I have setup a 301 redirect from my .com.au to my com using htaccess which wordpress generated.

Read More

The homepage works fine except now everytime I try to navigate around my website I keep getting 404 errors

My htaccess is as follows

RewriteEngine On
RewriteCond %{HTTP_HOST} ^website.com.au$ [OR]
RewriteCond %{HTTP_HOST} ^www.website.com.au$
RewriteRule ^/?$ "http://www.website.com/" [R=301,L]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Any help would be greatly appreciated

Thanks!

Related posts

1 comment

  1. Try your rules this way. I also made a few changes to the first redirect rule.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^(www.)?website.com.au$
    RewriteRule ^/?$ http://www.website.com/ [R=301,L]
    
    # BEGIN WordPress
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    

Comments are closed.