Aloha, I have deleted my wordpress installations because I'm moving everything to a new domain. Now I want to redirect visitors from my old domain to my new domain, but how do I create a HTML file that pops up no matter which URL the user enter? I need a HTML file that will pop up if the user for example write: http://www.example.com http://www.example.com/ http://www.example.com/monkey http://www.example.com/monkey.html Thanks, Mads
place a javascript redirect in your 404.html template on the old domain so when the users go there, they are immediately redirected to your new domain. [this is the asiest] If your looking to redirect them to a specific page then you're going to have to write a php redirect based on the old webpage extention and send it to the new domain based on the new domain. [Much more difficult this way]. If this is what you're looking for and you're not that good a coding i would suggest just rebuilding your site infrastructure with a redirect page for webpage. [easier but time consuming] just do a google search for javascript redirect on google. Good example from tizag.
If you have access to your Apache configuration, or your .htaccess allows it, you can just add this: Redirect permanent / http://new.example.com/ Code (markup):
yes, that one is quite similar to the one I use... but I still can't make the original WP post adresses redirect to my new site I selected the PHP version: <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.newdomain.com/" ); ?> Redirecting http://www.olddomain.com works fine. Problem is redirecting something like http://www.olddomain.com/my-old-page/. I can't make such addresses redirect - instead I get a wonderful 404 Not Found error What is the secret trick? (please be aware that some of my post names have changes when I moved to the new domain)
Use the .htaccess method if you can, you can make it wildcard redirect all subpages on the old domain to the new one.
Yes, I have tried that - but it only works if the post names are the same (www.olddomain.com/post-232 redirects to www.newdomain/post-232). What to do if the post names have changed?