Apache2 rewrite for URL redirects
If you have an old domain, that you want forwarded to a new domain, you can use the mod_rewrite module to automatically rewrite the url.
This should be put in the mod_rewrite section of the .htaccess file
under the root of the web server so that all requests for
yourolddomain.com are rewritten to yournewdomain.com
RewriteCond %{HTTP_HOST} ^yourolddomain.com$ [NC]
RewriteRule .* http://yournewdomain.com/ [L,R=301
RewriteRule .* http://yournewdomain.com/ [L,R=301
No comments yet.
Leave a comment
You must be logged in to post a comment.
Search
Chad's Twitter
- @jackljohnson: haha, thanks for the vote of confidence
- wow, just got a call from tech support for a consulting job I did 2 years ago. Um, updateyourrecordsfools.com
- @boondox: If it has to be specifically open source, then you may want to look into programmer or Linux Systems admin
- Totally bummed I can't use themes with Apps. I hate you all.
- I am truly humbled by the amount of support I've been receiving for Linux Basement. Thank you.