-2

I have a website: www.example.pro - with pages like: www.example.pro/contact-us/ and www.example.pro/about/

I want every URL from this website to redirect to: www.example.com

Example: when opening www.example.pro/about/ - it will redirect to www.example.com (and not to www.example.com/about/ like you might think..)

This is my current HTACCESS:

# BEGIN WordPress
<IfModule mod_rewrite.c>
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} ^example\.pro$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.pro$
RewriteRule ^(.*)$ "http\:\/\/www\.example\.com\/$1" [R=301,L]

Please help me solve this one!

Imnotapotato
  • 5,308
  • 13
  • 80
  • 147

1 Answers1

0

The wordpress part was the problem.

Doesn't matter what htaccess code I wrote it got thing wrong.

The solution is simple... Delete all htaccess code and write:

RewriteRule ^ http://www.yellowheadinc.com [R=301,L]

Thanks for non-relevant vote downs :) !

Imnotapotato
  • 5,308
  • 13
  • 80
  • 147