Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    2

    Default Prioritizing index file types

    Hello everyone; it's my first post here, and I searched the forums, but didn't see anything relevant, so please forgive the newbish question :)
    I have a webserver using CPanel 11. I have a directory containing files named index.css, index.html, index.php, and index.js . I need to prioritize which file is looked for first, because the webserver looks for .php files before .html and .css (which is what I want), but for some reason it displays .js files over .php files :\
    This means that whenever users view my site, they automatically see the index.js page, unless they manually type in /index.php, which obviously no one does.
    How would I go about fixing this? I know there was a way you could do it in version 9, but I can't find it in version 11 :(

    Thanks in advance :)
    -wyrmmage

  2. #2
    Member
    Join Date
    Jul 2006
    Posts
    6

    Default

    We can change the order of precedence, enter a DirectoryIndex command with multiple file names on the same line in the .htaccess file on that directory. The order in which the file names are listed (from left to right) determines the order of precedence. For example,

    DirectoryIndex index.cs index.cgi index.php index.js


    Hope this helped you.
    Last edited by libin; 03-19-2008 at 10:24 PM.
    libins

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    2

    Default

    perfect!
    Works beautifully ^_^

    Thank you
    -wyrmmage

Similar Threads & Tags
Similar threads

  1. Limit File Types
    By Doug E in forum New User Questions
    Replies: 1
    Last Post: 08-08-2009, 02:44 PM
  2. Index.php not recognized as index file in addon domains
    By hubrik in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-16-2008, 10:57 AM
  3. Certain types of zip files in file manager (X)
    By SMG in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-10-2008, 10:13 AM
  4. Restrict File Types on Subdomains
    By Avtar9 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-11-2004, 04:14 AM
  5. file sizes and file types
    By energiserve in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-16-2003, 04:11 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube