WEB How can I do this? 2 mod rewrites?

Discussion in 'OT Technology' started by Browning, Feb 1, 2008.

  1. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    at the moment I already have this in my htaccess

    Code:
    RewriteEngine on
    RewriteRule ^(/)?$ whoispro.cgi
    But I want to also add a 301 but when I did my page went all to hell:rofl:

    Is it possible to have both in there? :hsd:
     
  2. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
  3. Echilon

    Echilon Reichsführer

    Joined:
    Jul 24, 2005
    Messages:
    80
    Likes Received:
    0
    Location:
    England
    What code did you try. You should be able to add it above the existing code.
     
  4. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    Code:
    RewriteEngine on
    RewriteRule ^(/)?$ whoispro.cgi
    
    that's in there now. I'd like to add a redirect so when some one visits http://mysite.com it'll take them to http://www.mysite.com
     
  5. GotVtec

    GotVtec 8th World Wonder

    Joined:
    Mar 14, 2000
    Messages:
    575
    Likes Received:
    0
    Location:
    Omaha, NE
    Code:
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
     
  6. intrktevo

    intrktevo New Member

    Joined:
    Oct 18, 2004
    Messages:
    5,781
    Likes Received:
    0
    Location:
    UCF
    I've been wondering how to do that, thanks!
     
  7. Browning

    Browning Active Member

    Joined:
    Feb 14, 2005
    Messages:
    89,465
    Likes Received:
    10
    so which one goes first?
     
  8. GotVtec

    GotVtec 8th World Wonder

    Joined:
    Mar 14, 2000
    Messages:
    575
    Likes Received:
    0
    Location:
    Omaha, NE
    I'd put the rewrite for the www-push to the URL.
     

Share This Page