I had made the page the-book.html in wordpress site, later changed the name to about-the-book, now i have written the .htaccess file as**RewriteRule ^the-book.html$ http://www.conversationissexy.com/about-the-book/ [R=301]**# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule> # END WordPressbut it doesn't works..
.htaccess 301 rewrite rule not working
wordpress;htaccess;mod rewrite
1. Try adding [L] flag next to R=301 -- right now redirect will not occur straight away and URL gets processed by other rules (the WordPress block). The L flag in conjunction with R=3xx tells Apache to execute such redirect immediately:RewriteRule ^the-book.html$ http://www.conversationissexy.com/about-the-book/ [R=301,L]This should do the job.2. If still nothing -- move the above rule inside WordPress block and place just after RewriteBase line:# BEGIN WordPress<IfModule mod_rewrite.c>   RewriteEngine On   RewriteBase /   # your redirect rule   RewriteRule ^the-book.html$ http://www.conversationissexy.com/about-the-book/ [R=301,L]   # actual WordPress rules   RewriteRule ^index\.php$ - [L]   RewriteCond %{REQUEST_FILENAME} !-f   RewriteCond %{REQUEST_FILENAME} !-d   RewriteRule . /index.php [L]</IfModule> # END WordPress3. Alternatively, use RedirectMatch directive instead of RewriteRule so you can keep your redirect rule where it is right now:RedirectMatch 301 ^/the-book.html$ http://www.conversationissexy.com/about-the-book/