Close

Results 1 to 8 of 8
  1. #1
    VIP Member Elwood's Avatar
    Join Date
    Jan 2001
    Location
    Poland
    Posts
    1,544
    Thanks
    0
    Thanked:        0
    Karma Level
    494

    Default editing .htaccess

    Hi guys, i'm trying to put rss feeds from BBC sport into a website, so I need to put php code into my html pages, but


    1 Instructions for adding PHP code to an HTML site;

    PHP scripts do not automatically work on html pages. If you have an HTML or (.HTM) based site, in order for PHP scripts to run on your .htm or .html pages you have a 2 options;

    1. For Apache Servers Edit your .htacess with AddType application/x-httpd-php .htm .html Then Add the php code from the reader directly to your html pages

    2. For Apache Servers Edit your .htacess with either .htm server parsed .html server parsed or
    Addhandler application/x-httpd-php .html .php Then follow the directions below to use the php code from the reader with SSI Includes.
    How do i edit this .htaccess? I log in with aceFTP to my host and I can see the .htaccess file, but I cant seem to download it or execute it or anything that I can do with the other files.

    thanks
    Last edited by Elwood; 4th December 2006 at 02:42 AM. Reason: to make it clearer what I meant!

  2. #2
    VIP Member Elwood's Avatar
    Join Date
    Jan 2001
    Location
    Poland
    Posts
    1,544
    Thanks
    0
    Thanked:        0
    Karma Level
    494

    Default Re: editing .htaccess

    I have the php code all working perfectly, as when I put it into a test .php file and upload it it displays just like I want it, I guess if I need to I can change every file from .html to .php but I dont want to do this as there is dozens of pages and they all link back and forward to each other so it will be much easier if I can do it like they say above!

    thanks

  3. #3
    DF VIP Member hxbro's Avatar
    Join Date
    Nov 2000
    Location
    Behind a wall
    Posts
    2,731
    Thanks
    4
    Thanked:        18
    Karma Level
    476

    Default Re: editing .htaccess

    just create a file called .htaccess and add the AddType line in and ftp to the server, put it on the same directory as the html files
    Download my latest breaks and electro mixes or listen to Sellout Breaks FM

  4. #4
    VIP Member Elwood's Avatar
    Join Date
    Jan 2001
    Location
    Poland
    Posts
    1,544
    Thanks
    0
    Thanked:        0
    Karma Level
    494

    Default Re: editing .htaccess

    Hi thanks, I just tried that, it didnt work. Now php files will load, but html ones wont load at all. Before they loaded but just didnt display the php content, now they wont load at all lol.

    Do I need anything else in that htaccess file? right now I just have that single lin e in it.

    thanks

  5. #5
    DF VIP Member tam9's Avatar
    Join Date
    Apr 2002
    Location
    The city of R
    Posts
    3,855
    Thanks
    2
    Thanked:        1
    Karma Level
    637

    Default Re: editing .htaccess

    DirectoryIndex index.php index.html

    try adding that mate

  6. #6
    VIP Member Elwood's Avatar
    Join Date
    Jan 2001
    Location
    Poland
    Posts
    1,544
    Thanks
    0
    Thanked:        0
    Karma Level
    494

    Default Re: editing .htaccess

    thanks but not working either. I'm just going to change the pages to php rather than html, oh well I'll know next time and I'll do it that what to start with!

  7. #7
    DF VIP Member hxbro's Avatar
    Join Date
    Nov 2000
    Location
    Behind a wall
    Posts
    2,731
    Thanks
    4
    Thanked:        18
    Karma Level
    476

    Default Re: editing .htaccess

    I've used this before for wap pages (.wml files):

    DirectoryIndex index.wml
    AddType text/vnd.wap.wml wml
    AddType application/x-httpd-php .php .wml

    so for html pages it'd be :

    DirectoryIndex index.html index.php
    AddType application/x-httpd-php .php .html
    Download my latest breaks and electro mixes or listen to Sellout Breaks FM

  8. #8
    VIP Member Elwood's Avatar
    Join Date
    Jan 2001
    Location
    Poland
    Posts
    1,544
    Thanks
    0
    Thanked:        0
    Karma Level
    494

    Default Re: editing .htaccess

    cheers guys, I gave in in the end and changed the pages to php... I'll try it that way next time and see if it works!

Similar Threads

  1. Editing TW.cfg
    By g7vkb in forum Digital & Cable TV
    Replies: 1
    Last Post: 18th February 2003, 05:22 PM
  2. Music Editing Util
    By HaRv3sT in forum PC Software
    Replies: 3
    Last Post: 24th October 2002, 03:28 AM
  3. Digital Video Editing
    By pcolasurf in forum PC Software
    Replies: 8
    Last Post: 11th October 2002, 06:53 PM
  4. Pinnacle Video Editing Kit
    By {film_man} in forum PC Hardware
    Replies: 7
    Last Post: 9th October 2002, 05:58 PM
  5. Editing Games on the HDD
    By FTLOSM in forum Microsoft Consoles
    Replies: 5
    Last Post: 30th September 2002, 10:40 AM

Social Networking 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
  •