Results 1 to 5 of 5
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    224
    Create a proper domain redirect
    I ran across a thread dealing with this a while back...but for the life of me I can't find it again. So I would appreciate help on this matter.

    If I have a website, full path http://www.widgets.com, some visitors will remember the name and simply enter www.widgets.com or widgets.com into a search bar.

    How do I set up .htaccess to make sure that when a visitor enters the search terms www.widgets.com or simply widgets.com they get directed to the main website http://www,widgets.com?

    Thanks, Rick K.
    "Whether you think you can, or whether you think you can't...You're right!" -Henry Ford-

  2. #2
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    I put this in my .htaccess file. It works for me.

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^widgets\.com
    RewriteRule (.*) http://www.widgets.com/$1 [R=301,L]
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  3. #3
    ABW Ambassador DesignerWiz's Avatar
    Join Date
    January 18th, 2005
    Location
    U.S.A
    Posts
    2,777
    Hi Rick, I think you may be referencing this thread?
    http://forum.abestweb.com/showthread.php?t=49555
    Ray Thomas
    Webmaster Resources: http://DesignerWiz.com
    ABW Board Category: Programming / Coding
    http://forum.abestweb.com/forumdisplay.php?f=190

  4. #4
    Full Member
    Join Date
    January 18th, 2005
    Posts
    224
    Thanks, Gordon and Ray!

    I'll give the .htaccess a shot (want to learn more about it anyway) but will keep the javascript saved in case of screwups (mine) or in case my host doesn't allow jacking with the .htaccess file.
    "Whether you think you can, or whether you think you can't...You're right!" -Henry Ford-

  5. #5
    ABW Ambassador FFoc's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,015
    in my virtual hosts directive, I've got:

    Code:
    ServerName www.somehost.com
    ServerAlias somehost.com
    And it does the exact same thing..

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Traffic redirect from landing domain, is this permitted?
    By Billias77 in forum Newbie Affiliate FAQs & Helpful Articles
    Replies: 0
    Last Post: October 10th, 2010, 11:05 AM
  2. Replies: 1
    Last Post: May 21st, 2009, 05:14 AM
  3. Question about 301 redirect and moving blog to domain
    By writerguy in forum Blogging, Mobile and Social Media
    Replies: 8
    Last Post: September 18th, 2008, 09:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •