How to redirect domain without changing url

You can setup to redirect domain without changing URL. Here is how:

Open your .htaccess file for the domain that your users will go to and insert these lines of code:

RewriteCond %{HTTP_HOST} ^
RewriteRule ^(.*)$1 [P]

If you are using the file manager in cPanel, be sure that you have the option to show hidden files selected.


What does the above redirect do?
After adding this line into your .htaccess file, you will be able to go to and it will show the content from For example, if you have changed your domain to, but you still have a lot of traction for an old domain you can use this to show them all of the new content which is present in the new domain, without any updates to the old domain.


Thanks for dropping by !!! Feel free to comment to this post or you can also drop me an email at [email protected]