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.

WHM Accelerated 2 - domain redirections

Discussion in 'General Discussion' started by faemont, Nov 28, 2013.

  1. faemont

    faemont Registered

    Joined:
    Nov 28, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello everyone,

    1st time on the forums, 1st time using WHM Accelerated 2.

    I have a problem, i have moodle installed on a folder called moodle2, so if i need to go to my moodle i enter this url:
    www./moodle2.
    But inside the moodle you can choose more than 1 language so lets say i have 2 languages, english and french...
    example.com/moodle2/?lang=fr_ca (french)
    example.com/moodle2/?lang=en (english)

    I want to add a redireccion for each one so when i enter
    example.com/french it redirects me to example.com/moodle2/?lang=fr_ca
    and
    example.com/english it redirects me to example.com/moodle2/?lang=en

    Can anyone help me with this? i will appreciate this a lot.

    Thanks in advance for everything...

    Bye for now!
     
  2. Rhuan

    Rhuan Active Member

    Joined:
    Nov 10, 2010
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hi, I think this will work for you:
    Make .htaccess file and put this code...

    Code:
    RewriteEngine On
    RewriteRule ^french$ ?lang=fr_ca [L]
    You need mod_rewrite enabled on apache...
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    Note that you may also want to post to a forum dedicated to Mod_Rewrite rules as you may get more input on that type of forum compared on here where issues are primarily focused on the cPanel software itself.

    Thank you.
     
Loading...

Share This Page