Simple Redirect problem

Discussion in 'Apache' started by bluehatseo, Feb 25, 2008.

  1. #1
    Currently, I only have static HTML pages on a domain and want to redirect domain.com to www.domain.com

    I added the following statement as the first statement in .htaccess :
    Redirect 301 / http://www.domain.com/

    and got the following message(from Firefox) ---

    "The page isn't redirecting properly

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete."

    I am on 1and1's servers. All advice welcome.
     
    bluehatseo, Feb 25, 2008 IP
  2. kulinar

    kulinar Member

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Try with RedirectMatch or you can also try mode_rewrite
    Options +FollowSymlinks
    RewriteEngine On
    RewriteRule ^(.*) http://domain.com/$1 [R=301,L]
    Code (markup):
     
    kulinar, Feb 26, 2008 IP