WordPress.org

Ready to get started?Download WordPress

Forums

301 redirect not working (2 posts)

  1. scamp50
    Member
    Posted 3 years ago #

    I have some rewrit code in my .htaccess file. I have moved a static HTML site into wordpress and need the following:

    1) redirect http://domain.com.au to http://www.domain.com.au
    2) redirect index.html to http://www.domain.com.au/

    I cannot get eitehr to work, I have tried all the various methods that have been suggested. The domain.com.au to http://www.domain.com.au works for all pages except for the home page, e.g. http://domain.com.au/ourteam redirects to http://www.domain.com.au/ourteam

    But it will not redirect for the root (home page).

    Also I get a page not found error for the index.html redirect.

    My .htaccess file:

    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/

    Anyone help - I am tearing my hair out with this!!!!

    thanks

  2. scamp50
    Member
    Posted 3 years ago #

    Anyone able to help????

Topic Closed

This topic has been closed to new replies.

About this Topic