Log in

View Full Version : .htaccess and mod_rewrite?


JustinBr
12-14-2006, 06:03 AM
If I want http://www.roicommunity.com/blog to appear as http://www.roicommunity.com, how do I do this? I'm thinking its something to do with a mod_rewrite in the .htaccess file, but I'm not sure how to write it. Anyone know?

Thanks.

The Finman
12-14-2006, 08:10 AM
RedirectMatch 301 /blog/(.*) http://www.roicommunity.com


Upload that as an .htaccess file into your blog folder

That will redirect them to roicommunity.com...but the url would simply reflect the url of wherever you send them to.

Although these people use a slightly different redirect script than mine above...this is still a pretty good site for understanding and using .htaccess files.

http://www.javascriptkit.com/howto/htaccess.shtml

Hope this helps. :)