Suppose I redirect exmpale0.com to example1.com , example1.com is newer. Already , I promoted my exmpale0.com into social networks , Suppose I had:


Now I have


When I use http://example0.com, It can redirect to example1.com but I need to every URL what I promote into internet work fine,

Question is, Do you have any redirect solution for all of subURL?


You want to do a blanket redirect from one domain to another.

Assuming Apache, put in your .htaccess file in the root directory of example0.com:

RewriteEngine on
RewriteRule ^(.*)$ http://www.example1.com/$1 [L,R=301]

This will redirect all requests from 0 to 1 and keep the original request URI.

  • I added your code to .htaccess and when i request http://example0.com/%D8%AD%D9%84-%D9%85%D8%B4%DA%A9%D9%84-briefly-unavailable-for-scheduled-maintenance-check-back-in-a-minute-%D8%AF%D8%B1-%D9%88%D8%B1%D8%AF%D9%BE%D8%B1%D8%B3/ I get the following error : The requested URL /index.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. – PersianGulf Aug 27 '15 at 9:33
  • Oh thnk you , I eliminated my some code in .htaccess file. – PersianGulf Aug 27 '15 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.