Hi there.
I want to redirect olddomain.com(without www) to newdomain.com(without www)including all the inner pages of old domain to newdomain.com (without www)
It should looks something like this:
olddomain.com
olddomain.com/home/category/page.html
olddomain.com/home/mybook/page2.html
should be 301 redirect to the new newdomain like below:
newdomain.com
newdomain.com
newdomain.com
This is what I have in .htaccess file for redirecting at this moment:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) http://newdomain.com/$1 [R=301,L]
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteRule ^/?$ "http\:\/\/\newdomain\.com" [R=301,L]
However, this code it's working for redirecting olddomain.com to newdomain.com
And the inner pages are looking like this:
olddomain.com/home/category/page.html is redirecting to ====> newdomain.com/home/category/page.html and not to newdomain.com like I want.
Can you help me with a code in .htaccess file?
Thank you,appreciated.