301 redirect on .htaccess not working with WordPress

I’ve got below 301 redirect the bottom one I would like to get it working but it’s not working at the moment.

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

# END WordPress
RewriteCond %{HTTP_HOST} ^domain.com.au$
RewriteRule ^/?$ "http://www.domain.com.au/" [R=301,L]
RewriteRule ^author/privacy?$ privacy [R=301,L]

Is there a reason why?

Read More

I would like to redirect author/privacy to privacy…

Related posts

Leave a Reply

2 comments

  1. Order of the rules is of problem here. Here is the fixed version:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    
    Options +FollowSymLinks +Indexes
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^domain.com.au$ [NC]
    RewriteRule ^$ http://www.domain.com.au/ [R=301,L]
    
    RewriteRule ^author/(privacy)/?$ /$1 [R=301,L,NC]
    
    RewriteRule ^index.php$ - [L]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    </IfModule>
    # END WordPress
    
  2. Just had the same problem, but this is the answer…..
    Use relative URL’s not full http:// etc.
    Cut the below code and add to your .htaccess file and add to your root directory

    Redirect 301 /page1.php /page2.html
    Redirect 301 /page3.php /page4.html
    
    
     <IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteBase /
     RewriteRule ^index.php$ - [L]
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule . /index.php [L]
     </IfModule>