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 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:
    1
    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:
    1
    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:
    1
    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:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
Loading...

Share This Page