Wednesday, June 08, 2011

mod_rewrite to another server

We have hosted our company blog at blogspot.

We wanted to have blog hosted on org website. as people should not leave our website.

First solution was to host blog with some blog engine like wordpress.

Second solution I thought it might be possible to use apache mod-rewrite to internally redirect http://screen-magic.com/blog to
our screen-magic.blogspot.com

I never did it. but I started by websearching. Apache mod rewrite it bit tricky. You never know whats happening.

after several unsuccessful attempts and pemutation and combinations finally got it work.

here is the solution



Options -Indexes FollowSymLinks MultiViews
AllowOverride all
Options +FollowSymLinks
RewriteEngine on
RewriteRule blog http://screen-magic.blogspot.com/ [P]
Order allow,deny
allow from all


Here is working demo
Click to see ScreenMagic Blogs

No comments: