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.

How to redirect without url changing?

Discussion in 'General Discussion' started by frankliu, Jun 30, 2015.

  1. frankliu

    frankliu Registered

    Joined:
    Jun 30, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Taiwan
    cPanel Access Level:
    Website Owner
  2. xargs

    xargs Registered

    Joined:
    Jan 5, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    If you only want to show that folder and you don't have root access you can try with mod_rewrite. I have this redirect in a .htaccess and it works, but it is not a production server so I dont know if there is any downside :

    RewriteEngine on
    RewriteCond %{REQUEST_URI} /subfolder [NC]
    RewriteRule ^(.*)$ http://www.otherdomain.com/$1 [P,L]

    regards.
     
  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
Loading...

Share This Page