Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: MIME types configuring files

  1. #1
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Question MIME types configuring files

    Hello!
    (Mod's please move this thread if it's not in the right place)
    After a recent topic on the forums, "JS file reading its own querys" I learned alot of what a MIME type can do (i.e. turn a php file into a JS file, with php synatx). Now my question is that can I make up a file extension ( lets say .login) and with a mime type, I turn it into a php document, still with the extension .login and with php sytax? If you need any clarification on what I am trying to do, please post
    Thanks,
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    you can add this to either your httpd.conf file or any htaccess file i believe (for apache that is):

    Code:
    AddType application/x-httpd-php .ext .goes .here
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default

    Thanks,
    I do not normally write htaccess files, I just pasted in to a new file called (htaccess.htaccess) in the folder where the file is ( Im am using .it) I does not phrase it. Please, I am new to this, Please give detailed information on how to do this, Thanks,
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It should be called .htaccess, not htaccess.htaccess. The dot is a UNIX convention for hidden files.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default

    HELP!
    After I renamed it, it disappeared, and when I went to my main page, a 500 Internal Error came up. Nothing works in that folder, my entire site does not work. But everything not it the folder still works. How can I properly add the .htaccess, and delete the one I cannot see!
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    What are you using to upload the file? If you're in SSH or something, use ls -a to show hidden files too. If you're using a graphical client, there's probably an option to show hidden files.

    The 500 error means that there's something wrong with your .htaccess and Apache can't understand it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default

    O.K. I am clam now, I got rid of the file, But where can I put the file so that it will work. Maybe I just wrote the file wrong. cna You please show me what to upload and where to do it. Thanks,
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes, your file is probably wrong. Post it here?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Nov 2006
    Location
    Northeast USA
    Posts
    408
    Thanks
    8
    Thanked 30 Times in 28 Posts

    Default

    Sorry for the late post (I've been sick for 2 days).
    ----
    Like I said before, this is the first time I have ever messed around with this stuff. My file (.htaccess) looks exactly as thetestingsite's just with my file extension:
    Code:
    AddType application/x-httpd-php .it
    Is there some syntax I am missing? Im I puting the file in the wrong folder?
    Thanks,
    -Ben -- THE DYNAMIC DRIVERS
    My Links: My DD Profile||My Youtube Video Tutorials||DD Helping Coders||DD Coders In Training
    I told my client to press F5, the client pressed F, then 5, *facepalm*

  10. #10
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    make file in notepad, notepad++ or other PLAIN TEXT Editor. Do NOT use WORDpad, Word, etc.

    put this in it:

    Code:
    AddType application/x-httpd-php .html .htm .it
    AddHandler application/x-httpd-php .html .php .htm .it
    no extra spaces, each on it's own line. Save it to your desktop, name it "file.txt"

    upload it to your server in the HIGHEST point possible (usually / - root) if you have a public_html or root folder it need to go outside that.

    once uploaded rename to ".htaccess" Doing this will make sure it is uploaded in the right context (Binary vs. ASCII).

    Make sure its CHMOD is 644, nothing else.

    it should now work. If not, then ask your server host if .htaccess is supported on the server.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •