I've some rewrite code during my .htaccess file. I've moved a static HTML site into wordpress and want the next to operate:

  1. redirect http://domain.com.au/ to http://www.domain.com.au/
  2. redirect (that old static webpage) index.html to http://www.domain.com.au/

I am unable to get with the idea to work, I've attempted the various techniques which have been recommended. The domain.com.au to http://www.domain.com.au works best for all pages aside from the house page, e.g. http://domain.com.au/ourteam redirects to http://www.domain.com.au/ourteam

But it won't redirect for that root (webpage).

Also I recieve a webpage not found error for that index.html redirect.

My .htaccess file is:

Options +FollowSymlinks
RewriteEngine on
### re-direct index.html to root
RewriteCond %{THE_REQUEST} ^.*\/index\.html
RewriteRule ^(.*)index\.html$ /$1 [R=301,L]
### non www to www
RewriteCond %{HTTP_HOST} ^domain\.com\.au$ [NC]
RewriteRule ^(.*)$ http://www.domain.com.au/$1 [R=301,L]

redirect 301 /team.html http://www.domain.com.au/our-team/
redirect 301 /contact.html http://www.domain.com.au/contact-us/

Anybody help - I'm tearing my hair by helping cover their this!

Sorry, i simply had challenge with this and located: Using htaccess to 301 redirect, not working

Apparently you need to place the redirects over the #begin wordpress as apache processes the rewrites rather than reaches your redirects.

Try:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on

### non www to www
RewriteCond %{HTTP_HOST} ^domain.com.au [NC]
RewriteRule ^(.*)$ http://www.domain.com.au/$1 [R=301,L]

### re-direct index.html to root
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://www.domain.com.au/ [R=301,L]

redirect 301 /team.html http://www.domain.com.au/our-team/
redirect 301 /contact.html http://www.domain.com.au/contact-us/

# WrodPress rules begin here...
</IfModule>