Advice Articles

  • Beginners
    Just getting started? Loads of powerful advice here for beginners.
  • Intermediate
    Got a handle on the basics? Find more advanced topics covered here.
  • Advanced
    Warning! Advanced topics covered here.
  • Affiliate resources
    Affiliate marketing resources for affiliates and affiliate program managers tools, websites, books and articles.
  • Product reviews
    Candid reviews of the latest products to take you to the next level.


 

Affiliate Marketing Forum

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups   RegisterRegister ProfileProfile  Log in to check your private messagesPrivate Messages Log inLog in  
SSI include

Affiliate Marketing Forum Index -> Do-It-Your-Selfers
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
varunpratap



Joined: 17 Aug 2004
Posts: 534

PostPosted: Wed Aug 03, 2005 1:01 pm    Post subject: SSI include Reply with quote

I m having problems with using SSI.
I m using this in .htaccess file
AddHandler server-parsed .html
AddHandler application/x-httpd-php .php .htm .html

and <!--#include virtual="menu.html" -->
in my main file
now when I use .html I just can't see the menu. it seems server is not parsing it..
but when I use .shtml I can see the menu
where is exactly the problem?
I even change
AddHandler server-parsed .html
to
setHandler server-parsed .html
it started givin me server error..

Varun Pratap
_________________
My Blog with Step by Step 30 Internet Success Challenge

Internet Marketing Tips
Back to top View user's profile Send private message
Charlie



Joined: 22 Aug 2003
Posts: 3305
Location: UK

PostPosted: Thu Aug 04, 2005 10:56 am    Post subject: Re: SSI include Reply with quote

Hello Varun.

I tried a similar thing a few years ago (but parsing .html as PHP - as a Google experiment)...

varunpratap wrote:
now when I use .html I just can't see the menu. it seems server is not parsing it..
but when I use .shtml I can see the menu
where is exactly the problem?


To be honest, I'm a bit rusty with this, but one thing I do know, is that certain hosts restrict what you can do with .htaccess.

Some people worry that if everyone parsed .html, servers would slow down, though I suspect this is more theoretical than a practical concern, these days.

Nonetheless, I'd check with your host. To be honest, it's always best to OK this sort of thing first, even if it is possible. Hosts can get a bit twitchy about surprises of this kind.

Secondly, what's the reason for needing this? Maybe someone can suggest another solution.

Cheers,
Charlie.
_________________
"Before I speak, I have something important to say."
- Groucho Marx
Back to top View user's profile Send private message
varunpratap



Joined: 17 Aug 2004
Posts: 534

PostPosted: Thu Aug 04, 2005 12:44 pm    Post subject: Reply with quote

Hi Charlie,
thnx for the tip... anyways I got it working... the regular command for parsing wasnt working
I talked to my host.. and well they have allowed to us to do .htacess parsing..
Actually I m putting up a site which has rite now about 30 pages... and I know that it has potential to get big(around 400-pages). I wanted to use
SSI in menu section. So that I can add additional links and dont have to change every single html file(I have done this.. and I still regret not using SSI in my first site.. it was pain changing almost 400 pages 1 by 1)

So this time around, I m planning from advance using SSI. anyways like I said I made it to work this is exact code I used
Quote:
AddType text/html .shtml .html .htm
AddHandler server-parsed .shtml .html .htm
Options Indexes FollowSymLinks Includes


Now my next problem is I can't use Php commands in my html Sad
Addhandler server-parsed .html
so that I can use php in my html pages.
well I am also putting up content from my blog so thats a php script and a php include..

Man this gets really trouble some.. sometimes
Varun Pratap
_________________
My Blog with Step by Step 30 Internet Success Challenge

Internet Marketing Tips
Back to top View user's profile Send private message
robertb



Joined: 09 Aug 2003
Posts: 1838
Location: Columbus, OH

PostPosted: Thu Aug 04, 2005 1:01 pm    Post subject: Reply with quote

varunpratap wrote:
I wanted to use
SSI in menu section.


Don't stop there.... Try including other common areas of your pages as well with SSI; it's a real time saver.
_________________
Robert
Instant Site Comments - Allow Visitors to Comment On Your Content!
EbookNiches.com - 4 PLR Ebook Packages Each Month
Learn About DropShipping
Back to top View user's profile Send private message Visit poster's website
varunpratap



Joined: 17 Aug 2004
Posts: 534

PostPosted: Thu Aug 04, 2005 4:19 pm    Post subject: Reply with quote

Quote:
Don't stop there.... Try including other common areas of your pages as well with SSI; it's a real time saver.

he he he.. Ya I was thinking about it too... this time around everything is properly planned...
Tho I use dreamweaver but I don't use template facilities.. So Menu and ads Section is the one that I have to care about a lot.

Varun Pratap
_________________
My Blog with Step by Step 30 Internet Success Challenge

Internet Marketing Tips
Back to top View user's profile Send private message
Charlie



Joined: 22 Aug 2003
Posts: 3305
Location: UK

PostPosted: Fri Aug 05, 2005 11:49 am    Post subject: Reply with quote

Varun,

Glad to hear you got the first problem solved...

varunpratap wrote:
Now my next problem is I can't use Php commands in my html Sad

I must admit I've never tried using PHP (the old fashioned embedded way) and SSIs in the same file. I'm not sure if this possible to parse the same file for two things at once!

To be honest, I much prefer PHP as you can jump in and out of a normal HTML page (labelled .php). If you use PHP includes, as you mentioned, you have the equivalent of SSIs anyway.

All the benefits, but much easier for "us" amateurs.

Cheers,
Charlie.
_________________
"Before I speak, I have something important to say."
- Groucho Marx
Back to top View user's profile Send private message
AndyBeard



Joined: 31 May 2005
Posts: 76
Location: Poland

PostPosted: Tue Aug 09, 2005 2:36 am    Post subject: Reply with quote

Did you try changing it directly from Cpanel?

I made one change, and because I have a single Cpanel covering all my sites, I can now use PHP in every html and htm page.

Another advantage of PHP is it is easier to setup a test environment on the desktop system you are using. Not always as easy to do this with SSI.
_________________
- Forget Dripping - The Content is going to flow! - Content Propulsion Lab
Exploring Niche Websites
Back to top View user's profile Send private message Visit poster's website
varunpratap



Joined: 17 Aug 2004
Posts: 534

PostPosted: Tue Aug 09, 2005 5:27 am    Post subject: Reply with quote

Hi andy.. can u provide me with some pointers on changing thru cpanel..
I just got introduced to cpanel.. my last host didn't have cpanel..
Varun Pratap
_________________
My Blog with Step by Step 30 Internet Success Challenge

Internet Marketing Tips
Back to top View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Affiliate Marketing Forum Index -> Do-It-Your-Selfers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum





Your host: Allan Gardyne.
Earning a good living from affiliate programs since 1998.