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.

help

Discussion in 'General Discussion' started by frost89, Jun 17, 2011.

  1. frost89

    frost89 Registered

    Joined:
    Jun 17, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello friends of cPanel. I have a question for you all and I hope I'll get the answer for my problem because I'm very confuse with this problem:confused:. For example I have a /http://www.example.com/ as my domain and insde of my public_html there is a file named a.php . The question is, how can I access my file (a.php) when I type /http://www.example.com in my web browser.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,471
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure I understand the question. To access that page you'd type in example.com/a.php is that what you're asking?
     
  3. RaptorUK

    RaptorUK Member

    Joined:
    Jun 16, 2011
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Rename a.php to index.php
     
  4. fi77i

    fi77i Well-Known Member

    Joined:
    Aug 20, 2008
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    If you want a.php to be your default index, so when you browse http://www.example.com a.php will be displayed.
    You can do that using the .htaccess file.
    You need to set the a.php as the directory index.
    If I'm not worng the syntax is

    DirectoryIndex a.php
     
  5. frost89

    frost89 Registered

    Joined:
    Jun 17, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks fi77i it's working now ^^.
     
  6. fi77i

    fi77i Well-Known Member

    Joined:
    Aug 20, 2008
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    Nice to hear it, you are welcome! :)
     
Loading...

Share This Page