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 hide file name and redirect it to folder name.

Discussion in 'General Discussion' started by hws, Mar 20, 2009.

  1. hws

    hws Registered

    Joined:
    Mar 20, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Hi,

    I have seen something before that some website's have http://www.*****.com/myfolder/ instead of http://www.*****.com/myfolder/****.htm.

    How do they do that? I tried to do it but was unable to do so with my cpanel. Firstly i used a subdomain den i redirected the file. It did now work.

    Can you please help with this as i want to hide my file name e.g index.html will not be displayed but the folder name
     
  2. andyaav

    andyaav Member

    Joined:
    Jan 1, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    151
    Create .htaccess file under that folder ( here 'myfolder') with follwoing code.

    DirectoryIndex index.html index.htm index.php

    This would set your default page to index.html and you will able to access it with URL http://www.*****.com/myfolder/

    ------------
    Anand
     
  3. hws

    hws Registered

    Joined:
    Mar 20, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Thank you very much.....very simple. Was not sure if you can add the .htaccess file to those folders but just in the apache.

    I have something else. With cpanel......i want a folder http://****.com/myfolder/ to be redirected to a different folder /newfold/. One thing you should keep in mind is that the folder /myfolder/ already has 50mb of files in it therefore i might have to change each file to suit this change.

    Is there an easier way to do this? Would a .htaccess file also do the trick?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,429
    Likes Received:
    415
    Trophy Points:
    583
    Location:
    Pennsylvania
    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