Too many redirects with Virtual Host and htaccess

Discussion in 'Apache' started by hovaness, Apr 5, 2013.

  1. #1
    I have a WAMP server that hosts a few sites, but I have a particular site with about 5 domains. I want them all to point to the correct website folder and all to be redirected to a single domain for SEO purposes. Here is what it looks like in the virtual hosts file:
    <VirtualHost 50.62.82.101>
    ServerAdmin info@hovaness.com
    DocumentRoot "c:/wamp/www/example"
    ServerName example.com
    ServerAlias example.net www.example.com www.examples.net www.examples.com examples.com examples.net
    ErrorLog "logs/example.com.log"
    Code (markup):
    The htaccess file looks like
    [/SIZE][/COLOR][/FONT][FONT=Verdana]RewriteEngine On RewriteRule ^(.*)$ http://sellingwarriors.com/$1 [R=301,L] RewriteBase /[/FONT]
    [FONT=Verdana]
    Code (markup):

    Am I only supposed to have one or the other? I have also tried in the htaccess file:
    [SIZE=14px][FONT=Verdana]RewriteEngine On RewriteCond %{HTTP_HOST} ^(.*?).example(s?).(.*)$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] RewriteBase [/FONT][/SIZE]
     
     
     
    [COLOR=#141414][SIZE=14px][FONT=Consolas][COLOR=#000000][SIZE=14px][FONT=Consolas][COLOR=#141414][SIZE=15px][FONT=Arial][SIZE=14px][FONT=Consolas][FONT=Arial][COLOR=#000000][SIZE=14px]
    Code (markup):
    [/FONT][/FONT][/SIZE][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR]Any help is appreciated

    Stack Overflow Question
     
    Last edited: Apr 5, 2013
    hovaness, Apr 5, 2013 IP
  2. palsman

    palsman Active Member

    Messages:
    156
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    95
    #2
    We must see the internal server after that we can give you the answer.
     
    palsman, Jun 18, 2013 IP