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.

Configuring .htaccess for url redirection

Discussion in 'General Discussion' started by cpartsenidis, Nov 27, 2014.

  1. cpartsenidis

    cpartsenidis Registered

    Joined:
    May 21, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello to everyone,

    I need to hardcode into .htaccess the following and I would like to ask if someone can help me:

    When a user requests the following URL:

    http://www.mysite.com/click/redir.php?link=77

    I'd like it .htaccess to redirect it to this URL:

    http://www.theothersite.com/goto/?48321

    If anyone can help me, it would be much appreciated.

    Thank you in advanced!

    Chris.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you tried using the "Redirects" option in cPanel to add this redirect? This option utilizes the .htaccess file when you add the redirect in the UI.

    Thank you.
     
Loading...

Share This Page