• Archives

  • Categories

Jun 25

Finally did some permenant redirection work

This is long overdue work, just one line, okay two lines of code, but it took me two months to get this done. I always wanted to redirect justrealized.com to i.justrealized.com because some people prefer to type ‘justrealized’ and hit CTRL+Enter on their browsers.

Anyway, this is more of a personal note. To do a permanent redirect using htaccess, you create a file called ‘.htaccess’ with the dot in front and upload it to your Apache web server. Make sure you have the modrewrite enabled. Put the following lines into your .htaccess file and change i.justrealized.com to your new domain.

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

301 means permanent redirect. There are lots of ways to do permanent redirects but .htaccess is the most straight forward method if you have the mod_rewrite working for you.

This redirects all your old URLs to your new domain.

Possibly related:

  1. How to redirect www to no-www in Lighttpd
  2. How to set up VirtualHost in Ubuntu
  3. How to enable Apache mod rewrite in Ubuntu
  4. How to set up VirtualHost in XAMPP for Windows

No comments yet. Leave yours here.


WordPress powered and Django inspired.
Love and elephants come after.
RSS: Posts and comments.