Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
.htaccess help - can't get SSI's to execute
Old 07-30-2006, 04:09 AM .htaccess help - can't get SSI's to execute
Experienced Talker

Posts: 33
Trades: 0
Hi there

I'm using an excellent program called bbclone which is a page hit counter.
It needs a .php page in which to run. I don't reallywant to rename all my pages from .html to .php.

I found that adding the following line:

Addhandler application/x-httpd-php .html .php

to the .htaccess allowed me to execute a php script within an .html page. Excellent, but now my .shtm Server Side Includes have stopped working! I tried renaming them to .inc , but I still couldn't include them.

My .htaccess file:

Options Indexes FollowSymLinks Includes
AddType application/x-httpd-cgi .cgi
AddType text/x-server-parsed-html .html
Options +ExecCGI
Addhandler application/x-httpd-php .html .php

Any ideas?

The real baby guide
monkey64 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-30-2006, 04:26 AM Re: .htaccess help - can't get SSI's to execute
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
that's because you don't have .shtml as a server parsed type, only .html

and you can't have .html as server parsed AND PHP parsed. It has to be one or the other.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-30-2006, 06:20 AM Re: .htaccess help - can't get SSI's to execute
Experienced Talker

Posts: 33
Trades: 0
Quote:
Originally Posted by chrishirst View Post
that's because you don't have .shtml as a server parsed type, only .html

and you can't have .html as server parsed AND PHP parsed. It has to be one or the other.
Actually got it to work by simply enclosing the includes in php tags:

<?php
include 'menu.shtm';
?>

Not sure if it's the right way, but it works!
monkey64 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to .htaccess help - can't get SSI's to execute
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11784 seconds with 12 queries