|
#1
|
|||
|
|||
|
I do not want to rename all my files with the extention .shtml. What can I put in the htaccess file to include an rss feed?
Thanks in advance! |
|
#2
|
||||
|
||||
|
If .shtml extension is needed to allow you to run code in your html files, then there is no way around it. html files with code in them will not run under .html.
You do not need to rename all of your files, just the ones with the RSS code on the page. If that is all of them, then you need to rename all of your files. |
|
#3
|
||||
|
||||
|
Quote:
We've tested in an pc-test server with apache and including some declarative lines in order to supporting the includes in all the .html and .htm pages an works nice. Is it possible here? (I hope so) |
|
#4
|
||||
|
||||
|
Quote:
From "Apache Tutorial: Introduction to Server Side Include": http://httpd.apache.org/docs/1.3/howto/ssi.html "A brief comment about what not to do. You'll occasionally see people recommending that you just tell Apache to parse all .html files for SSI, so that you don't have to mess with .shtml file names. These folks have perhaps not heard about XBitHack. The thing to keep in mind is that, by doing this, you're requiring that Apache read through every single file that it sends out to clients, even if they don't contain any SSI directives. This can slow things down quite a bit, and is not a good idea." Actually I had not heard about XBitHack either... wonder if that'd be an option... |
|
#5
|
||||
|
||||
|
Quote:
<== <==
|
|
#6
|
|||
|
|||
|
Try adding this to your .htaccess:
AddType text/html .html AddHandler server-parsed .html I haven't tried it on HG, but it works OK on two other shared hosting accounts I have. Obviously you dont want pages parsed if they have no SSI in them - as it'll push up server load and page load times - so I just use the .htm extension instead of .html for pages with no includes. |
|
#7
|
||||
|
||||
|
Quote:
|
|
#8
|
||||
|
||||
|
Quote:
Serra: I prefer my time and my comfort than a little resources in the server. anyway each day you will tented to using more and more SSI in order to including some "in all pages" info as header, menu, footer and so on. or how you're resolving it? if 40% or 50% of your pages need having SSI, then why worry about use separate extension?
|
|
#9
|
||||
|
||||
|
Some reason you all do not want to write php pages?
|
|
#10
|
||||
|
||||
|
Quote:
anyway php is taking also a lot of resources, sure more than SSI. php or other cgi programming is for including really variable info not semi-static as I want. |
|
#11
|
||||
|
||||
|
Quote:
Quote:
Quote:
|
|
#12
|
||||
|
||||
|
Quote:
other way is made it using js, I prefer SSI, only one line of code, simple and clear, maybe old style. In pages with no interaction (no host variable data), for me, there is not reason for using php or cgi, then I'm using SSI for include fixed blocks as footer or menu. of course alse there is frames, but my mom don't like frames. Quote:
If a page don't need host data (only fixed text as menu or footer) why need I using php in order to include footer lines mainly in html+js ? |
|
#13
|
||||
|
||||
|
Quote:
As for including headers and footers, php is very easy and works very well for that. |
|
#14
|
||||
|
||||
|
but SSI and PHP are so fast that it really does not matter considering the advantages of using included files.
If you need to use PHP for other purpouses, then this is the way to go, but in sites or pages where php are not needed, SSI with html is the best in my opinion. also for including header/menu and footer maybe (?) you can only need an include an one file.txt if using divs+css . |
|
#15
|
|||
|
|||
|
How to customize adsense account?
I have all my pages in static html. As such if I want to change my adsense font, i.e adsense javascript to blend in my website how do I include a php include? Thanks |
|
#16
|
||||
|
||||
|
for me, this case (if you don't need any other php) can be made using SSI.
|
|
#17
|
||||
|
||||
|
Quote:
<?php include 'filename.inc'; ?> where filename.inc is the file you're going to include (it can be a .txt file or an .html file and have those extensions but it's neater and keeps things clearer for your organization to call them .inc) If you are making a number of files to include, you may want to create a directory/folder called 'includes' for them and make things neater with this in the headers of the pages that are calling them: <? php ini_set("include_path", "../includes"); ?> if necessary, changing the path as appropriate. Either way, rename the calling page so it has a .php extension. |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
All times are GMT -5. The time now is 09:46 AM.




<==
<==






