Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2004-03-14, 10:15 AM   #1
amber438
Whatever don't kill ya makes ya stronger...
 
amber438's Avatar
 
Join Date: Apr 2003
Location: New York
Posts: 820
Send a message via ICQ to amber438
really dumb ssi question

Maybe..maybe not..
My server is set to parse ssi on shtml..
I have an index.html I want to use ssi on..
can I add the parse handler line to my htaccess to make it work??
Or will it ignore that line? (the server that is)
__________________
Red Hot Links
Red Hot Galleries
amber438 is offline   Reply With Quote
Old 2004-03-14, 10:39 AM   #2
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
You can do it two ways.

You can have it pares all files as SSI no matter what the page extension is, but I would not do it that way.

You can make it so that index.shtml is a valid index page like this.

DirectoryIndex index.shtml index.php index.html index.htm

This is what I do.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2004-03-14, 11:54 AM   #3
amber438
Whatever don't kill ya makes ya stronger...
 
amber438's Avatar
 
Join Date: Apr 2003
Location: New York
Posts: 820
Send a message via ICQ to amber438
ok..I see..
will be a pia to change it cause my index for the domain is linked all over the place..crappolas..
ok..will think of a different angle
__________________
Red Hot Links
Red Hot Galleries
amber438 is offline   Reply With Quote
Old 2004-03-15, 05:30 PM   #4
venturi
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
Join Date: Apr 2003
Location: An Oasis atop a High Desert Mesa
Posts: 282
Send a message via ICQ to venturi
Hey Amber!

Assuming SSI is configured right on your server you can conditionally parse .html pages for SSI includes.

Just add "XBitHack on" to your .htaccess file and then chmod the pages with SSI in them to 755.
venturi is offline   Reply With Quote
Old 2004-03-15, 06:03 PM   #5
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Doesn't that cause all your pages to be parsed as SSI pages even the php ones?
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2004-03-16, 02:42 AM   #6
venturi
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
Join Date: Apr 2003
Location: An Oasis atop a High Desert Mesa
Posts: 282
Send a message via ICQ to venturi
Nope, Cleo, it shouldn't... I won't say "never" because there is no "never" with server admin. LOL

Using the XBitHack on setting in .htaccess ONLY parses your .html files that have permissions of 755 to be parsed. Normal HTML & PHP files should have persmissions of 644

The other option is to do the AddHandler .htaccess entry, or updating httpd.conf in apache, which WILL cause ALL .html to be parsed for SSI - and that will drag a server to its knees if you have lots of domains running and/or tons of pages and/or traffic.

PHP/Perl files should not be affected by either - if I understand the Apache docs correctly.

XBitHack is a very useful tool to use if you have LOTS of html pages and/or traffic but only have select few that are utilizing SSI.

I have used this many times when building premium AVS sites, for example, where I have literally 1000's of images loading on HTML but I only wanted my index/gallery pages to use SSI - the full-image HTML pages were treated as generic HTML.

BTW, my host on my virtual server account actually recommended the XBitHack method to me when I inquired about this subject a couple years ago because it lessens the strain on the server.

Last edited by venturi; 2004-03-16 at 02:49 AM..
venturi is offline   Reply With Quote
Old 2004-03-16, 04:58 PM   #7
amber438
Whatever don't kill ya makes ya stronger...
 
amber438's Avatar
 
Join Date: Apr 2003
Location: New York
Posts: 820
Send a message via ICQ to amber438
That is very kewl..I just wanted to add a small ssi to an html..I asked my host and he said addhandler..but I dont want all the html pages in that domain to be able to parse..
I will try this..!! it's way kewl!!
thank you!
what is the exact synatx..?
__________________
Red Hot Links
Red Hot Galleries
amber438 is offline   Reply With Quote
Old 2004-03-16, 05:07 PM   #8
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Quote:
Originally posted by venturi
Using the XBitHack on setting in .htaccess ONLY parses your .html files that have permissions of 755 to be parsed. Normal HTML & PHP files should have persmissions of 644

The other option is to do the AddHandler .htaccess entry, or updating httpd.conf in apache, which WILL cause ALL .html to be parsed for SSI - and that will drag a server to its knees if you have lots of domains running and/or tons of pages and/or traffic.
Ok that explains it, I was thinking of AddHandler which I tried once for about 90 seconds, just about crashed my server and stopped my php pages from working.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2004-03-16, 05:37 PM   #9
DangerDave
Bonged
 
DangerDave's Avatar
 
Join Date: Mar 2003
Location: BrisVegas, AUSTRALIA
Posts: 4,882
If your server grinds to a halt after adding a AddHandler... I would be looking at the server;( ? It shouldnt. The load added by the AH may have been large back in the old days.. but now? your server should be able to handle it.

Using an htacess with AddHandler in single directory is also an option.

DD
__________________
Old Dollars >>>> Now with over 90 Hosted Free Sites <<<<
DangerDave.com.au - Adult Links to Free Porn
DangerDave is offline   Reply With Quote
Old 2004-03-16, 05:42 PM   #10
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
It was a long time ago and a few hosts ago when I tried it.

Taught me to always link to a directory and not a page seeing as it is so easy to change what the default index page is.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2004-03-16, 06:47 PM   #11
venturi
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
Join Date: Apr 2003
Location: An Oasis atop a High Desert Mesa
Posts: 282
Send a message via ICQ to venturi
Agreed, DD, on a typical server built for adult traffic AddHandler *shouldn't* bring it down to it's knees - but it may affect page load times noticably if you have TONS of pages. However, some of the mainstream hosts I've seen will shoot craps just with a CGI banner rotator running - totally different world there. :/

OK, the syntax...
In your .htaccess file add this:
Code:
XBitHack on
Then using SSH or FTP change permissions on your .html files that have SSI includes to 755 (or -rwxr-xr-x).

That's it! Now apache will only parse those files with the 755 perms for SSI.

One caveat to this method... It can be a chore to keep track of what pages should be 755 and what don't. I didn't keep records of this stuff last time I changed hosts and it was a PIA to sort things out...

Last edited by venturi; 2004-03-16 at 06:50 PM..
venturi is offline   Reply With Quote
Old 2004-03-17, 09:19 AM   #12
amber438
Whatever don't kill ya makes ya stronger...
 
amber438's Avatar
 
Join Date: Apr 2003
Location: New York
Posts: 820
Send a message via ICQ to amber438
gotcha!!
__________________
Red Hot Links
Red Hot Galleries
amber438 is offline   Reply With Quote
Old 2004-03-26, 04:42 PM   #13
amber438
Whatever don't kill ya makes ya stronger...
 
amber438's Avatar
 
Join Date: Apr 2003
Location: New York
Posts: 820
Send a message via ICQ to amber438
ok..before I do this..this will not change the way apache handles the ssi on shtml right??
__________________
Red Hot Links
Red Hot Galleries
amber438 is offline   Reply With Quote
Old 2004-03-26, 08:33 PM   #14
venturi
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
Join Date: Apr 2003
Location: An Oasis atop a High Desert Mesa
Posts: 282
Send a message via ICQ to venturi
No ma'am. Shouldn't affect your .shtml docs one bit.
venturi is offline   Reply With Quote
Old 2004-03-28, 12:04 AM   #15
Opti
I Didn't Do It
 
Opti's Avatar
 
Join Date: Aug 2003
Location: au
Posts: 795
Send a message via ICQ to Opti
Quote:
Agreed, DD, on a typical server built for adult traffic AddHandler *shouldn't* bring it down to it's knees - but it may affect page load times noticably if you have TONS of pages.

I have an addhandelr in htaccess to make php work in all html pages on a bunch of domains on the same server.. 100,000+ html pages are affected... Although i cant really compare speed to how it runs without this set (as the pages all rely on php).. Ive had it like this for at least a couple years since I bought the server... and it seems to run pretty fast to me.

I always imagined if every page had php to be parsed anyway it wouldn't affect server load at all. Anyone technical enough to know if this is right?

Also.. say only 10% of html pages required php.. would it then be a bad idea to use addhandler to parse all .html pages for php? Surely the server overhead would be minimal, and never noticable to the eye, I would hope.
Opti is offline   Reply With Quote
Old 2004-03-31, 12:47 AM   #16
venturi
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
Join Date: Apr 2003
Location: An Oasis atop a High Desert Mesa
Posts: 282
Send a message via ICQ to venturi
I can only hazard a guess as I don't have access to a datacenter and servers to run a benchmark test ...

PHP *generally speaking* is less resource intensive than Perl as it is usually configured to run under apache, however I would hazard a guess that having ALL .html files parsed for PHP would be as intensive as having apache parse all .html for SSI.

My current primary host has apache set up to parse .html for PHP but that's not common - he also has some damned fast servers so I wouldn't use my experiences as any kind of comparison.

I guess I'd have to say if I was backed into a corner on this issue would be that if only 10% of my pages required PHP I'd either:

1) convert those pages to .php, or
2) use IFRAME code to include the PHP code where needed.

There probably is a more eloquent answer/solution but those are the ways I have dealt with this in the past.
venturi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT -4. The time now is 07:24 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc