The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect problems

Discussion in 'General Discussion' started by djrven, Sep 14, 2011.

  1. djrven

    djrven Registered

    Joined:
    Sep 14, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello guys, I'm a newbie here, so I'm having a problem trying to make work a redirect, I need the following redirect: http://www.domain.com/bb1 --- goes to --- http://rs1.anotherdomain.com:8034/;stream.mp3 --- the last one is a shoutcast audio server destination, when you put destination url on browser you don't have problem, but when you do the same through cpanel redirect you get a wrong result with an ecoded url on browser's bar like this http://rs1.domain.com:8034/;stream.mp3 and of course a failed attempt to get the right answer by shoutcast server

    This is the .htaccess' file content:

    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^bb1\/?$ "http\:\/\/rs1\.domain\.com\:8034\/\;stream\.mp3" [R=301,L]

    I don't know where would be the problem, but if you have any clue about this, I'd appreciate your answer! many thanks in advance!
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please try putting the following:

    Code:
    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^bb1\/?$ "http\:\/\/rs1\.domain\.com\:8034\/\;stream\.mp3" [R=301,L,NE]
    You can see details on the NE flag at this location (RewriteRule Flags - Apache HTTP Server)

     
  3. djrven

    djrven Registered

    Joined:
    Sep 14, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Many thanks Tristan it worked! although I used RewriteRule ^bb1$ "http://rs1.domain.com:8034/;stream.mp3" [R=301,L,NE]
    I mean without escaping characters! Thanks!
     
Loading...

Share This Page