|
|
![]() |
#1 |
Whatever don't kill ya makes ya stronger...
|
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) |
![]() |
![]() |
![]() |
#2 |
Subversive filth of the hedonistic decadent West
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. |
![]() |
![]() |
![]() |
#3 |
Whatever don't kill ya makes ya stronger...
|
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 |
![]() |
![]() |
![]() |
#4 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
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.
__________________
Please Re-Read The Rules For Sig Files |
![]() |
![]() |
![]() |
#5 |
Subversive filth of the hedonistic decadent West
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?
|
![]() |
![]() |
![]() |
#6 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
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.
__________________
Please Re-Read The Rules For Sig Files Last edited by venturi; 2004-03-16 at 02:49 AM.. |
![]() |
![]() |
![]() |
#7 |
Whatever don't kill ya makes ya stronger...
|
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..? |
![]() |
![]() |
![]() |
#8 | |
Subversive filth of the hedonistic decadent West
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 |
Bonged
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 |
![]() |
![]() |
![]() |
#10 |
Subversive filth of the hedonistic decadent West
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. ![]() |
![]() |
![]() |
![]() |
#11 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
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 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... ![]()
__________________
Please Re-Read The Rules For Sig Files Last edited by venturi; 2004-03-16 at 06:50 PM.. |
![]() |
![]() |
![]() |
#12 |
Whatever don't kill ya makes ya stronger...
|
gotcha!!
|
![]() |
![]() |
![]() |
#13 |
Whatever don't kill ya makes ya stronger...
|
ok..before I do this..this will not change the way apache handles the ssi on shtml right??
|
![]() |
![]() |
![]() |
#14 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
No ma'am. Shouldn't affect your .shtml docs one bit.
![]()
__________________
Please Re-Read The Rules For Sig Files |
![]() |
![]() |
![]() |
#15 | |
I Didn't Do It
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#16 |
No offence Apu, but when they were handing out religions you must have been out taking a whizz
|
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.
__________________
Please Re-Read The Rules For Sig Files |
![]() |
![]() |
![]() |
|
|