Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    1
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,884
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice