Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Jul 2008
    MD, USA
    Thanked 0 Times in 0 Posts

    Getting 4 parts (.shtml, PHP, .ssi, reCAPTCHA) to work on a page using .htaccess

    I'm new at PHP so please bear with me as I have very little idea what I'm talking about.

    I have a page, saved with an .shtml extension, that contains PHP (for a contact form), as well as a reCAPTCHA script to prevent spam. The page also features an include (.ssi) in the footer. So, 4 parts to the page:

    1. .shtml
    2. PHP contact form
    3. reCAPTCHA
    4. .ssi include

    (Additional and perhaps totally unnecessary info is that every page on the site has an .shtml extension, there are multiple contact forms (4-5), and since the .ssi include is the footer, it is used sitewide as well.)

    I've altered the .htaccess a bit, with this:

    Options +Includes
    AddType text/html .shtml .shtm .htm .html
    AddHandler server-parsed .shtml
    AddHandler application/x-httpd-php .shtml .shtm .htm .html
    AddHandler php5-cgi .php
    (I'm about as new to modifying .htaccess as I am to PHP, so, again, no idea what I'm talking about.)

    (If it helps any, I'm using Dreamhost.)

    Everything is OK except for this, this is what I'm having a problem with: either the reCAPTCHA shows and the .ssi/footer doesn't, or the .ssi/footer shows and the reCAPTCHA doesn't. They don't work at the same time.

    I've played around with the .htaccess all day, to no avail. I've researched. I can't find anything to help, or steer me in the right direction.

    As it stands right now, the code above (the .htaccess) makes the .ssi/footer show and the reCAPTCHA not.

    If I change it to this:

    AddType text/html .shtml .shtm .htm .html .php
    AddHandler php5-cgi .shtml .shtm .htm .html .ssi
    ...then the reCAPTCHA shows, and the .ssi/footer doesn't.

    Any help would be great!!!!
    Last edited by mssteph; 04-27-2010 at 11:41 PM. Reason: Spelling


Tags for this Thread

Posting Permissions

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