need help on mod_rewrite

Discussion in 'Apache' started by Jim_Westergren, Dec 28, 2005.

  1. #1
    Ok, I have this site: http://ov2.net - a free URL redirection.

    With the .htaccess file I want to accomplish the following:

    - http://www.ov2.net redirects to http://ov2.net
    - That if you go to OV2.net/test2 it shows that in the URL field and not http://www.ov2.net/test2/ that it shows now.

    I tried the following lines:

    
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.ov2\.net [NC]
    RewriteRule ^(.*)$ http://ov2.net/$1 [L,R=301]
    
    Code (markup):
    But it doesn't work at all.

    I am willing to pay for this.

    Thanks.
     
    Jim_Westergren, Dec 28, 2005 IP
  2. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    Try
    Options +FollowSymlinks
    RewriteEngine on 
    RewriteCond %{HTTP_HOST} !^ov2.net$ 
    RewriteRule ^(.*)   http://ov2.net/$1  [QSA,L,R=301]
    Code (markup):
    I do not need $$$, but backlinks are welcome.:D

    Jean-Luc
     
    Jean-Luc, Dec 28, 2005 IP
  3. Jim_Westergren

    Jim_Westergren Notable Member

    Messages:
    1,882
    Likes Received:
    247
    Best Answers:
    0
    Trophy Points:
    235
    #3
    That works!

    Thanks :D

    You can submit to AXEQ.com for free. Just add #FREE# in the description and I will edit it out and add you - you don't need to pay.
     
    Jim_Westergren, Dec 28, 2005 IP