SEO Home
About Us
Downloads
Contact
Getting to RJS
Job Vacancies

SEO Services

SEO Consultancy
SEO Singapore
SEO Resources
SEO Book
SEO Tips
SEO Search Ad
   - Search Ad Example
SEO Free Tools
   - Site Analysis
   - Pagerank Checker
   - Check Loading Time
   - Google Key Position

SEO Training

SEO Workshop
SEO Registration
SEO Training Objective
SEO Workshop Images

Stock Image

Photography Services
Photography Signup
RJS Logo

Portal Managment

StreetDirectory Factsheet

Google
Services


Rewrite Tips - 301 Moved Permanently Redirect for Apache Web Server

1. How to Use 301 Redirect Sub-Domain to Domain for Apache Web Server

For those of you utilizing an mod_rewrite for URI rewriting, here is a quick tip on setting up a 301 Moved Permanently rule for http://example.com/ to http://www.example.com/.
RewriteCond Host: ^example\.com
RewriteRule (.*) http\://www\.example\.com$1 [I,RP]
Just drop the above rule into your local configuration file (e.g. httpd.conf) No longer do you need to get your hosting provider involved when setting up 301 Moved Permanently redirects.

Be sure to always check your Server Headers to verify that the correct HTTP Status Codes are being returned.

Robert J Steiner is a Singapore SEO Company that provides SEO services such as SEO Training, SEO Consultancy & Florist company specialising in Flowers, Roses & Gifts.