homepage Welcome to WebmasterWorld Guest from 54.167.75.155
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

    
Forward to WWW
forwarding your domain to www address
akande




msg:343425
 7:07 pm on Mar 6, 2004 (gmt 0)

I am wondering how I can setup my Redhat Linux box to forward any traffic that goes to the address mydomainexample.com to www.mydomainexample.com.

This must also work for pages within the site such as mydomainexample.com/site/it/exam/ should go to www.mydomainexample.com/site/it/exam/

Thanks ahead of time

 

encyclo




msg:343426
 7:30 pm on Mar 6, 2004 (gmt 0)

Assuming you're running Apache on your Linux box, you should add this to httpd.conf or to the .htaccess file in your document root:

Options +FollowSymLinks 
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule ^(.*)$ [example.com...] [R=301,L]

You need mod_rewrite enabled, of course.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved