Reputation: 531
to be very honest I have zero knowledge with Regex and .htaccess
somewhere I found this code sample to redirect the user from old domain to new domain and it works fine
RewriteCond %{HTTP_HOST} ^(www\.)?old\.com$ [NC]
RewriteRule ^(.*)$ http://www.new.com/$1 [R=301,L]
But what is the issue here is when I access any page like www.old.com/courses it remains there rather of redirecting it to www.new.com/courses
It is a wordpress site and it has thousand of such sub/internal pages.
Upvotes: 0
Views: 468