RewriteCond Missing a / between domain.com "/" subpage

Discussion in 'Apache' started by qlmarketing, Feb 14, 2011.

  1. #1
    Hi there

    Kindly clau provided me with this rewrite code that appends a .au to the end of a domain name for all addresses point to the old domain however currently when it redirects it is missing a / between the domain and the sub page im sure its an easy fix but i just have no idea when it comes to Apache any help would really make my day and be most appreciated

    example

    http://www.domain.com/page/ <==== entered in browser
    http://www.domain.com.aupage/ <==== redirects to this address


    Thanks in advanced

    Nick


    
    AddHandler cgi-script .cgi
    #AddType application/x-httpd-cgi .cgi .pl
    #Options +Indexes +ExecCGI
    #DirectoryIndex index.cgi
    #AllowOverride Limit FileInfo Indexes
    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^quantumb2bnetwork.com/$ [OR]
    RewriteCond %{HTTP_HOST} ^www.quantumb2bnetwork.com/$
    RewriteRule ^(.*)$ "http\:\/\/www\.quantumb2bnetwork\.com\.au\/$1" [R=301,L]
    Code (markup):
     
    qlmarketing, Feb 14, 2011 IP
  2. Natcoweb

    Natcoweb Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteCond %{HTTP_HOST} ^(quantumb2bnetwork.com|www.quantumb2bnetwork.com)$
    RewriteRule ^(.*)$ http://www.quantumb2bnetwork.com.au/$1 [R=301,L]
     
    Natcoweb, Feb 15, 2011 IP
  3. qlmarketing

    qlmarketing Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That was perfect ! So many smart people on the internet !!! truly grateful thanks again
     
    qlmarketing, Feb 16, 2011 IP